Re: D 1.076 and 2.061 release

2013-01-02 Thread bearophile
Are you going to remove the D1 compiler parts of code in the D2 compiler source code? A leaner source base will help. Also this transitional moment seems a good moment to rename the .c suffix of the frontend+backend C++ files to .cpp or something like that. I have to warn people that if they

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jonathan M Davis
On Wednesday, January 02, 2013 09:12:49 bearophile wrote: I have to warn people that if they want to suddenly switch from 2.060 to 2.061 with no intermediate steps, probably some of their code will break, and they will have to work to fix it. Why? - Jonathan M davis

Re: D 1.076 and 2.061 release

2013-01-02 Thread bearophile
Jonathan M Davis: Why? Because the two numbers 2.060 and 2.061 look very very similar, so people that see them risk thinking they are just two nearly identical releases of the same compiler. But many months have passed between those two versions, many bugs have being removed, several

Re: Awesomium D wrappers/bindings

2013-01-02 Thread David
Am 02.01.2013 08:48, schrieb evilrat: arrays initialized with nulls right? anyway just setting only first symbol in text field(it's wchar[4]) is enough. Not wchar arrays: import std.stdio; void main() { writefln(0x%x, wchar.init); } this prints: 0x

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jonathan M Davis
On Wednesday, January 02, 2013 10:19:54 bearophile wrote: Jonathan M Davis: Why? Because the two numbers 2.060 and 2.061 look very very similar, so people that see them risk thinking they are just two nearly identical releases of the same compiler. But many months have passed between

Re: D 1.076 and 2.061 release

2013-01-02 Thread bearophile
Jonathan M Davis: And how is that any different from any other release? How much time used to pass between two adjacent releases, in past? Bye, bearophile

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jacob Carlborg
On 2013-01-02 00:46, Walter Bright wrote: 2. the OS X package hasn't been built yet (problems with the package script). What isn't working? Is there something I can do to help? -- /Jacob Carlborg

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jacob Carlborg
On 2013-01-02 12:55, bearophile wrote: Jonathan M Davis: And how is that any different from any other release? How much time used to pass between two adjacent releases, in past? Bye, bearophile Around a month, perhaps. -- /Jacob Carlborg

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jacob Carlborg
On 2013-01-02 00:46, Walter Bright wrote: 2. the OS X package hasn't been built yet (problems with the package script). I think this will fix the problem: https://github.com/D-Programming-Language/installer/pull/9 I don't know if this is the problem you encountered but: PackageMaker is

Re: D 1.076 and 2.061 release

2013-01-02 Thread David Eagen
On Wednesday, 2 January 2013 at 08:20:41 UTC, Jonathan M Davis wrote: On Wednesday, January 02, 2013 09:12:49 bearophile wrote: I have to warn people that if they want to suddenly switch from 2.060 to 2.061 with no intermediate steps, probably some of their code will break, and they will have

Re: D 1.076 and 2.061 release

2013-01-02 Thread Johannes Pfau
Am Wed, 02 Jan 2013 15:14:53 +0100 schrieb David Eagen davidea...@mailinator.com: On Wednesday, 2 January 2013 at 08:20:41 UTC, Jonathan M Davis wrote: On Wednesday, January 02, 2013 09:12:49 bearophile wrote: I have to warn people that if they want to suddenly switch from 2.060 to 2.061

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 4:12 AM, Jacob Carlborg wrote: On 2013-01-02 00:46, Walter Bright wrote: 2. the OS X package hasn't been built yet (problems with the package script). What isn't working? Is there something I can do to help? The various packages are all built on Ubuntu. The OS X one failed

Re: D 1.076 and 2.061 release

2013-01-02 Thread Iain Buclaw
On Wednesday, 2 January 2013 at 17:53:58 UTC, Walter Bright wrote: On 1/2/2013 4:12 AM, Jacob Carlborg wrote: On 2013-01-02 00:46, Walter Bright wrote: 2. the OS X package hasn't been built yet (problems with the package script). What isn't working? Is there something I can do to help?

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 7:27 AM, Johannes Pfau wrote: That's unfortunately normal for every dmd release. We try to stay API compatible, but ABI usually breaks with every compiler/druntime/phobos update. This means you can't mix object/library files compiled with different compiler versions. I go to some

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 9:59 AM, Iain Buclaw wrote: On Wednesday, 2 January 2013 at 17:53:58 UTC, Walter Bright wrote: On 1/2/2013 4:12 AM, Jacob Carlborg wrote: On 2013-01-02 00:46, Walter Bright wrote: 2. the OS X package hasn't been built yet (problems with the package script). What isn't working?

Re: D 1.076 and 2.061 release

2013-01-02 Thread Russel Winder
On Wed, 2013-01-02 at 09:53 -0800, Walter Bright wrote: […] The various packages are all built on Ubuntu. The OS X one failed because it couldn't find ruby, and ruby does not work on Ubuntu (at least my version of Ubuntu - there is no ruby package for it). There has been a Ruby package on

Re: D 1.076 and 2.061 release

2013-01-02 Thread Russel Winder
On Wed, 2013-01-02 at 10:07 -0800, Walter Bright wrote: […] Yeah, really. sudo apt-get ruby fails on Ubuntu 10.10. Any and all apt-related commands are likely to fail for that version of Ubuntu, it is no longer supported. Definitely need to stick with LTS version of Ubuntu or keep up to date,

XING Gruppe D Programming Language - XING group D Programming Language

2013-01-02 Thread notna
Hallo *. Ich habe auf XING die D Programmiersprache Gruppe einrichten lassen. Wer Interesse hat sich hier auszutauschen, Gleichgesinnte zu finden und/oder Kontakte zu pflegen, ist herzlichst eingeladen. Hier der Link: http://www.xing.com/net/dlang Frohes neues Jahr an alle D'ler

Re: XING Gruppe D Programming Language - XING group D Programming Language

2013-01-02 Thread Chris
On Wednesday, 2 January 2013 at 18:19:01 UTC, notna wrote: Hallo *. Ich habe auf XING die D Programmiersprache Gruppe einrichten lassen. Wer Interesse hat sich hier auszutauschen, Gleichgesinnte zu finden und/oder Kontakte zu pflegen, ist herzlichst eingeladen. Hier der Link:

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jordi Sayol
Al 02/01/13 19:07, En/na Walter Bright ha escrit: Really? http://packages.ubuntu.com/quantal/ruby Yeah, really. sudo apt-get ruby fails on Ubuntu 10.10. $ sudo apt-get install ruby -- Jordi Sayol

Re: XING Gruppe D Programming Language - XING group D Programming Language

2013-01-02 Thread notna
On 02.01.2013 19:24, Chris wrote: A D-ating site? :-) :D Hopefully on the way to something like that... then mainly for business dating ;)

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 10:37 AM, Jordi Sayol wrote: Al 02/01/13 19:07, En/na Walter Bright ha escrit: Really? http://packages.ubuntu.com/quantal/ruby Yeah, really. sudo apt-get ruby fails on Ubuntu 10.10. $ sudo apt-get install ruby That's what I did try, and yes, it fails too.

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 10:17 AM, Russel Winder wrote: On Wed, 2013-01-02 at 10:07 -0800, Walter Bright wrote: […] Yeah, really. sudo apt-get ruby fails on Ubuntu 10.10. Any and all apt-related commands are likely to fail for that version of Ubuntu, it is no longer supported. Definitely need to stick

Re: D 1.076 and 2.061 release

2013-01-02 Thread Russel Winder
On Wed, 2013-01-02 at 10:47 -0800, Walter Bright wrote: On 1/2/2013 10:37 AM, Jordi Sayol wrote: Al 02/01/13 19:07, En/na Walter Bright ha escrit: Really? http://packages.ubuntu.com/quantal/ruby Yeah, really. sudo apt-get ruby fails on Ubuntu 10.10. $ sudo apt-get install ruby

Re: D 1.076 and 2.061 release

2013-01-02 Thread Russel Winder
On Wed, 2013-01-02 at 10:51 -0800, Walter Bright wrote: […] I've been avoiding upgrading Ubuntu, because the last time I did that the installer trashed everything. Lost a day on that one. Just because it happened once doesn't mean it will always happen. Until I abandoned all use of Ubuntu, I

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jordi Sayol
Al 02/01/13 19:47, En/na Walter Bright ha escrit: On 1/2/2013 10:37 AM, Jordi Sayol wrote: Al 02/01/13 19:07, En/na Walter Bright ha escrit: Really? http://packages.ubuntu.com/quantal/ruby Yeah, really. sudo apt-get ruby fails on Ubuntu 10.10. $ sudo apt-get install ruby That's what I

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 11:09 AM, Russel Winder wrote: On Wed, 2013-01-02 at 10:51 -0800, Walter Bright wrote: […] I've been avoiding upgrading Ubuntu, because the last time I did that the installer trashed everything. Lost a day on that one. Just because it happened once doesn't mean it will always

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 11:09 AM, Jordi Sayol wrote: I don't know why. mercury ~ sudo apt-get install ruby [sudo] password for walter: Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required:

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 11:05 AM, Russel Winder wrote: To be expected in the circumstances since 10.10 is no longer supported. Looks like I'll have to hold my nose and push the upgrade button, but after this release is settled down. Does the latest Ubuntu work properly with SSD drives? I know 10.10

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jonathan M Davis
On Wednesday, January 02, 2013 03:20:27 Jonathan M Davis wrote: On Wednesday, January 02, 2013 10:19:54 bearophile wrote: Jonathan M Davis: Why? Because the two numbers 2.060 and 2.061 look very very similar, so people that see them risk thinking they are just two nearly identical

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jordi Sayol
Al 02/01/13 20:28, En/na Walter Bright ha escrit: On 1/2/2013 11:09 AM, Jordi Sayol wrote: I don't know why. mercury ~ sudo apt-get install ruby [sudo] password for walter: Reading package lists... Done Building dependency tree Reading state information... Done The following packages

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jordi Sayol
Al 02/01/13 19:51, En/na Walter Bright ha escrit: On 1/2/2013 10:17 AM, Russel Winder wrote: On Wed, 2013-01-02 at 10:07 -0800, Walter Bright wrote: […] Yeah, really. sudo apt-get ruby fails on Ubuntu 10.10. Any and all apt-related commands are likely to fail for that version of Ubuntu, it

Re: D 1.076 and 2.061 release

2013-01-02 Thread Dmitry Olshansky
1/2/2013 11:24 PM, Walter Bright пишет: On 1/2/2013 11:09 AM, Russel Winder wrote: On Wed, 2013-01-02 at 10:51 -0800, Walter Bright wrote: […] I've been avoiding upgrading Ubuntu, because the last time I did that the installer trashed everything. Lost a day on that one. Just because it

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jacob Carlborg
On 2013-01-02 20:09, Russel Winder wrote: I have the opposite experience, Apple hardware seems incapable of upgrading operating systems. Their policy seems to be you want a new operating system, then buy a new piece of hardware from the store. I've been updating a couple of Macs from 10.6

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jacob Carlborg
On 2013-01-02 19:51, Walter Bright wrote: I've been avoiding upgrading Ubuntu, because the last time I did that the installer trashed everything. Lost a day on that one. That's what backups are for :) -- /Jacob Carlborg

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 12:01 PM, Dmitry Olshansky wrote: P.S. I like calendar programs, but on Windows and Ubuntu, upgrading the OS inevitably deletes the calendar database. None of those frackin' calendar programs ever deign to tell me where they store their frackin' database, so I can back it up. I

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jacob Carlborg
On 2013-01-02 18:53, Walter Bright wrote: The various packages are all built on Ubuntu. The OS X one failed because it couldn't find ruby, and ruby does not work on Ubuntu (at least my version of Ubuntu - there is no ruby package for it). Looks like my mistake is I should have run it on OS X.

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jacob Carlborg
On 2013-01-02 21:37, Walter Bright wrote: Windows has gotten better in this regard, that is true. But it's still bizarre that, with Thunderbird, you can export/import the address book, but not the mail database. A welcome improvement would be to have a button to export/import the whole

Re: D 1.076 and 2.061 release

2013-01-02 Thread Matthew Caron
On 01/02/2013 03:37 PM, Walter Bright wrote: But it's still bizarre that, with Thunderbird, you can export/import the address book, but not the mail database. Why would you need to? If your mail store is IMAP, just let it rebuild. A welcome improvement would be to have a button to

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 12:47 PM, Jacob Carlborg wrote: On 2013-01-02 21:37, Walter Bright wrote: Windows has gotten better in this regard, that is true. But it's still bizarre that, with Thunderbird, you can export/import the address book, but not the mail database. A welcome improvement would be to

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 12:56 PM, Matthew Caron wrote: On 01/02/2013 03:37 PM, Walter Bright wrote: But it's still bizarre that, with Thunderbird, you can export/import the address book, but not the mail database. Why would you need to? If your mail store is IMAP, just let it rebuild. I don't store

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 12:36 PM, Jacob Carlborg wrote: On 2013-01-02 19:51, Walter Bright wrote: I've been avoiding upgrading Ubuntu, because the last time I did that the installer trashed everything. Lost a day on that one. That's what backups are for :) Having backups doesn't work so good when the

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jonathan M Davis
On Wednesday, January 02, 2013 13:18:02 Walter Bright wrote: What is the rationale behind import/export of address books, and not doing that for anything else? I don't know. kmail has basically the same problem. It drives me nuts that you can't export accounts. It makes setting up a new

Re: D 1.076 and 2.061 release

2013-01-02 Thread Russel Winder
On Wed, 2013-01-02 at 11:24 -0800, Walter Bright wrote: […] It does when you don't remember what goes in the host file, what you had installed, redoing all the ssh keys, etc. It also deleted all my virtual boxes, I never did figure out how to get them working again. I simply gave up on

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 1:29 PM, Jonathan M Davis wrote: On Wednesday, January 02, 2013 13:18:02 Walter Bright wrote: What is the rationale behind import/export of address books, and not doing that for anything else? I don't know. kmail has basically the same problem. It drives me nuts that you can't

Re: D 1.076 and 2.061 release

2013-01-02 Thread Xinok
On Wednesday, 2 January 2013 at 20:38:36 UTC, Walter Bright wrote: Windows has gotten better in this regard, that is true. But it's still bizarre that, with Thunderbird, you can export/import the address book, but not the mail database. A welcome improvement would be to have a button to

Re: D 1.076 and 2.061 release

2013-01-02 Thread David Nadlinger
On Wednesday, 2 January 2013 at 14:14:54 UTC, David Eagen wrote: I have noticed my project doesn't compile with 2.061 when it did with 2.060. I am using a few different static libraries, one of them is thrift. I had to recompile the libraries I use with 2.061 which meant I had to rebuild

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 1:32 PM, Russel Winder wrote: It also nuked all my mail and calender data, which is why I don't use Ubuntu for mail or calender anymore, nor do I use it for music (same thing happened). Over-reaction to the wrong issue. Evolution is entirely fine for mail and calendar, I use it all

Re: D 1.076 and 2.061 release

2013-01-02 Thread Chris Nicholson-Sauls
All I can say is I've never looked back since abandoning Canonical linuxes. And Debian in general, really. Hooray for Gentoo. More on-topic: I do look forward to playing around with UDA's and seeing what kind of strange voodoo I can cook up with them. Been anticipating this release for

Re: D 1.076 and 2.061 release

2013-01-02 Thread Jonathan M Davis
On Wednesday, January 02, 2013 23:58:08 Chris Nicholson-Sauls wrote: All I can say is I've never looked back since abandoning Canonical linuxes. And Debian in general, really. Hooray for Gentoo. Glutton for punishment are we? I used to use it and got sick of stuff breaking on me during

Re: D 1.076 and 2.061 release

2013-01-02 Thread dimsuz
On Wednesday, 2 January 2013 at 23:34:42 UTC, Jonathan M Davis wrote: I'd be shocked if he liked dealing with updates on Gentoo). I use Arch these days, since it provides a lot of the benefits of Gentoo without anywhere near as many of the headaches. +1 for Arch. Have used almost everything

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 2:45 PM, deadalnix wrote: On Wednesday, 2 January 2013 at 07:01:02 UTC, Bernard Helyer wrote: I am getting a whole _mess_ of warning: statement not reachable on everything after a final switch. I can confirm this. Freaking annoying (and not really convincing me that D is stable) !

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 2:58 PM, Chris Nicholson-Sauls wrote: Been anticipating this release for eons, it seems. Me too. I'm glad to get it out the door, as my head is boiling over with things I want to get done for the next version.

Re: D 1.076 and 2.061 release

2013-01-02 Thread F i L
dimsuz wrote: +1 for Arch. Have used almost everything Gentoo, Ubuntu, Debian, OpenSuse and ended up with Arch Linux. I am happy with it for almost two years now and wouldn't even consider switching to something else :) Same here. After making my way through the most popular Linux distros,

Re: D 1.076 and 2.061 release

2013-01-02 Thread SomeDude
On Wednesday, 2 January 2013 at 19:42:13 UTC, Jonathan M Davis wrote: On Wednesday, January 02, 2013 03:20:27 Jonathan M Davis wrote: On Wednesday, January 02, 2013 10:19:54 bearophile wrote: Jonathan M Davis: But many months have passed between those two versions, many bugs have being

Re: D 1.076 and 2.061 release

2013-01-02 Thread Marco Nembrini
On 03.01.2013 08:40, Walter Bright wrote: The most miserable of all is Microsoft Outlook Express, which stores all the info in hidden directories that are down a long chain of paths filled with directory names that are GUID identifiers. Then, the mail files themselves are in some secret binary

Re: D 1.076 and 2.061 release

2013-01-02 Thread Walter Bright
On 1/2/2013 8:15 PM, Marco Nembrini wrote: On 03.01.2013 08:40, Walter Bright wrote: The most miserable of all is Microsoft Outlook Express, which stores all the info in hidden directories that are down a long chain of paths filled with directory names that are GUID identifiers. Then, the

Re: D 1.076 and 2.061 release

2013-01-02 Thread Chris Nicholson-Sauls
On Wednesday, 2 January 2013 at 23:34:42 UTC, Jonathan M Davis wrote: On Wednesday, January 02, 2013 23:58:08 Chris Nicholson-Sauls wrote: All I can say is I've never looked back since abandoning Canonical linuxes. And Debian in general, really. Hooray for Gentoo. Glutton for punishment are

Re: D 1.076 and 2.061 release

2013-01-02 Thread Russel Winder
On Wed, 2013-01-02 at 13:18 -0800, Walter Bright wrote: […] I don't store email on the server, I store it locally. I think that this is at the heart of your mail problems. It means you rely on one and only one computer for email. I would find this unworkable: I find IMAP the only solution that

Re: D 1.076 and 2.061 release

2013-01-02 Thread Russel Winder
On Wed, 2013-01-02 at 18:34 -0500, Jonathan M Davis wrote: […] But if I had to recommend an easy-to-use distro, I'd recommend OpenSuSE, but as with all such things, YMMV. For better or worse, Ubuntu is very popular. I remain with Debian Unstable as it works for me, but you do sometimes have to

Required constness of opEquals (and opCmp) ?

2013-01-02 Thread monarch_dodra
I was wondering: Does Phobos require that user defined opEquals (and opCmp) be const? If someone wants to define a non-const opAssign, I'd say that's their problem, but are we (phobos) expected to support it? The reason I ask is because adding support for this means that every type that

Re: Required constness of opEquals (and opCmp) ?

2013-01-02 Thread Jonathan M Davis
On Wednesday, January 02, 2013 10:07:30 monarch_dodra wrote: I was wondering: Does Phobos require that user defined opEquals (and opCmp) be const? If someone wants to define a non-const opAssign, I'd say that's their problem, but are we (phobos) expected to support it? The reason I ask is

Re: Required constness of opEquals (and opCmp) ?

2013-01-02 Thread Era Scarecrow
On Wednesday, 2 January 2013 at 09:07:31 UTC, monarch_dodra wrote: My opinion is that supporting non-const opEquals makes no real sense, and adds a lot of useless complexity (and inconsistency) to the code. At best, it means silently accepting erroneous code... Until it explodes in someone

Re: Required constness of opEquals (and opCmp) ?

2013-01-02 Thread monarch_dodra
On Wednesday, 2 January 2013 at 09:23:55 UTC, Jonathan M Davis wrote: On Wednesday, January 02, 2013 10:07:30 monarch_dodra wrote: I was wondering: Does Phobos require that user defined opEquals (and opCmp) be const? If someone wants to define a non-const opAssign, I'd say that's their

Re: Required constness of opEquals (and opCmp) ?

2013-01-02 Thread monarch_dodra
On Wednesday, 2 January 2013 at 09:07:31 UTC, monarch_dodra wrote: Basically, a DList of tuples: Problem: DList has a const correct opEquals, but Tuple's isn't. It has: // bool opEquals(R)(R rhs); //1 bool opEquals(R)(R rhs) const; //2 // The problem is that //2 should really be:

Re: Smart pointers instead of GC?

2013-01-02 Thread DythroposTheImposter
I'm interested in how the new LuaJIT GC ends up performing. But overall I can't say I have much hope for GC right now. GC/D = Generally Faster allocation. Has a cost associated with every living object. C++ = Generally Slower allocation, but while it is alive there is no cost. So as

Re: auto ref and non-templated functions

2013-01-02 Thread jerro
Can we simply make it so that the compiler automatically creates a variable when you pass an rvalue to a non-templated auto ref function? So non-template auto ref parameters are just like ref parameters, except they will automatically convert rvalues to lvalues on call by creating a local

Re: Smart pointers instead of GC?

2013-01-02 Thread deadalnix
On Wednesday, 2 January 2013 at 11:41:33 UTC, DythroposTheImposter wrote: I'm interested in how the new LuaJIT GC ends up performing. But overall I can't say I have much hope for GC right now. GC/D = Generally Faster allocation. Has a cost associated with every living object. True,

Re: ref is unsafe

2013-01-02 Thread Maxim Fomin
On Sunday, 30 December 2012 at 08:38:27 UTC, Jonathan M Davis wrote: After some recent discussions relating to auto ref and const ref, I have come to the conlusion that as it stands, ref is not @safe. It's @system. This is not a surprise, I remember Andrei was talking about it 1.5 year ago.

numericValue for (unicode) characters

2013-01-02 Thread monarch_dodra
There is an ER that would allow to convert characters to numebers: http://d.puremagic.com/issues/show_bug.cgi?id=5543 For example: '1' = 1 Or, unicode considered: 'Ⅶ' = 7 Long story short, it was decided that it wasn't std.conv.to's job to do this conversion, but rather, there should be a

Re: numericValue for (unicode) characters

2013-01-02 Thread bearophile
monarch_dodra: The rationale for this: std.ascii: I think returning -1 as a magic number should help keep the code faster and with less clutter than with exceptions. For the ASCII version I have two use cases: - Where I want to go fastunsafe I just use c - '0'. - When I want more safety I'd

Requesting for project ideas

2013-01-02 Thread Ishan Thilina Somasiri
Hi, I'm posting this on bhalf of a group of 4 students from the final year of Department of Computer Science and Engineering,University of Moratuwa, Sri Lanka. We are required to do a 8 months long project in our final year. The project should consist of both a research and development component

Re: Requesting for project ideas

2013-01-02 Thread angel
Cool ! It's like 'Google summer of code' ...

Re: Requesting for project ideas

2013-01-02 Thread bearophile
Ishan Thilina Somasiri: We are required to do a 8 months long project in our final year. The project should consist of both a research and development component and an implementation. Our group is interested in areas such as, * Information security * Cloud * Parallel computing *

std.conv.parse too finicky?

2013-01-02 Thread Chris
I was playing around with std.conv.parse's mechanism for parsing associative arrays from strings (cf. http://dlang.org/phobos/std_conv.html#parse). A handy feature as it would allow user-friendly input formats that can be transformed into a D-array. However, the parser is very finicky and

Re: Requesting for project ideas

2013-01-02 Thread deadalnix
On Wednesday, 2 January 2013 at 16:15:00 UTC, Ishan Thilina Somasiri wrote: Hi, I'm posting this on bhalf of a group of 4 students from the final year of Department of Computer Science and Engineering,University of Moratuwa, Sri Lanka. We are required to do a 8 months long project in our

Re: std.conv.parse too finicky?

2013-01-02 Thread bearophile
Chris: Couldn't the parser infer from string[string] that the key:value pairs should be treated as strings, regardless of whether they are quoted or not? That parser is meant to be used to de-serialize simple D data structures printed (serialized) with writeln. Bye, bearophile

Re: Smart pointers instead of GC?

2013-01-02 Thread Thiez
On Wednesday, 2 January 2013 at 12:32:01 UTC, deadalnix wrote: Most GC language lack proper memory management, and sometime have design choice that are a nightmare for the GC (java have no value type for instance). Surely Java's primitive types (byte, short, int, long, float, double,

Re: std.conv.parse too finicky?

2013-01-02 Thread Chris
On Wednesday, 2 January 2013 at 17:06:50 UTC, bearophile wrote: Chris: Couldn't the parser infer from string[string] that the key:value pairs should be treated as strings, regardless of whether they are quoted or not? That parser is meant to be used to de-serialize simple D data structures

Re: std.conv.parse too finicky?

2013-01-02 Thread monarch_dodra
On Wednesday, 2 January 2013 at 17:02:48 UTC, Chris wrote: I was playing around with std.conv.parse's mechanism for parsing associative arrays from strings (cf. http://dlang.org/phobos/std_conv.html#parse). A handy feature as it would allow user-friendly input formats that can be transformed

Re: Requesting for project ideas

2013-01-02 Thread Jacob Carlborg
On 2013-01-02 17:14, Ishan Thilina Somasiri wrote: Hi, I'm posting this on bhalf of a group of 4 students from the final year of Department of Computer Science and Engineering,University of Moratuwa, Sri Lanka. We are required to do a 8 months long project in our final year. The project should

Is array concatenation allowed in the class destructor?

2013-01-02 Thread Ali Çehreli
This issue has come up on the D.learn forum recently. The following program terminates with core.exception.InvalidMemoryOperationError. (Tested with dmd 2.061 and 2.060) string foo() { return a; } class Foo { ~this() { auto s = foo() ~ b; } } void main() { new

Re: Social comments integrated with dlang.org

2013-01-02 Thread Nick Sabalausky
On Tue, 01 Jan 2013 14:24:52 -0800 Jonathan M Davis jmdavisp...@gmx.com wrote: On Tuesday, January 01, 2013 22:31:32 Simen Kjaeraas wrote: Understatement of the year. :-P Already? Wow. LOL. Well, it's actually very easy to make the understatement of the year when there have been

Re: Required constness of opEquals (and opCmp) ?

2013-01-02 Thread Ali Çehreli
On 01/02/2013 01:07 AM, monarch_dodra wrote: I was wondering: Does Phobos require that user defined opEquals (and opCmp) be const? Sorry that I am not adding to this topic directly but I will repeat an observation of mine. My experience is with C++ and D; if there are solutions to this issue

Re: std.conv.parse too finicky?

2013-01-02 Thread Chris
On Wednesday, 2 January 2013 at 17:22:57 UTC, monarch_dodra wrote: On Wednesday, 2 January 2013 at 17:02:48 UTC, Chris wrote: You could reduce burden by using raw strings: auto asso = `[key1:value1, key2:value2]`; Yes, I just thought it might be handy for reading user defined files like

Re: Is array concatenation allowed in the class destructor?

2013-01-02 Thread Maxim Fomin
On Wednesday, 2 January 2013 at 18:09:34 UTC, Ali Çehreli wrote: This issue has come up on the D.learn forum recently. The following program terminates with core.exception.InvalidMemoryOperationError. (Tested with dmd 2.061 and 2.060) string foo() { return a; } class Foo { ~this()

Re: Social comments integrated with dlang.org

2013-01-02 Thread H. S. Teoh
On Wed, Jan 02, 2013 at 01:05:59PM -0500, Nick Sabalausky wrote: On Tue, 01 Jan 2013 14:24:52 -0800 Jonathan M Davis jmdavisp...@gmx.com wrote: On Tuesday, January 01, 2013 22:31:32 Simen Kjaeraas wrote: Understatement of the year. :-P Already? Wow. LOL. Well, it's

Re: Social comments integrated with dlang.org

2013-01-02 Thread mist
Almost all YouTube videos are HTML5-ready. Really?? I thought youtube still uses Flash. I'm no fan of youtube, but it *is* a significant data point, considering that some people are actually making a living off homemade videos posted on youtube.

Re: ref is unsafe

2013-01-02 Thread Jonathan M Davis
On Wednesday, January 02, 2013 13:45:32 Maxim Fomin wrote: I think it should not be fixed, but probably compiler may issue warning at some circumstances when it can realize this situation. It's a hole in @safe. It must be fixed. That's not even vaguely up for discussion. The question is _how_

Re: Smart pointers instead of GC?

2013-01-02 Thread Mehrdad
On Tuesday, 1 January 2013 at 16:31:55 UTC, Stewart Gordon wrote: But there is something called packratting, which is a mistake at the code level of keeping a pointer hanging around for longer than necessary and therefore preventing whatever it's pointing to from being GC'd. I've heard it

Re: Smart pointers instead of GC?

2013-01-02 Thread Mehrdad
On Wednesday, 2 January 2013 at 17:18:52 UTC, Thiez wrote: On Wednesday, 2 January 2013 at 12:32:01 UTC, deadalnix wrote: Most GC language lack proper memory management, and sometime have design choice that are a nightmare for the GC (java have no value type for instance). Surely Java's

Running dtor at the end of scope on allocated by closure struct

2013-01-02 Thread Maxim Fomin
Consider this: import std.stdio; struct S { int[] data; this(this) { writeln(postblit); data = data.dup; } ~this() { writeln(dtor); data = null; } } auto foo() { S s = S([0]); return { assert(s.data !is null); } ; } void main() { auto dg =

Re: numericValue for (unicode) characters

2013-01-02 Thread Dmitry Olshansky
1/2/2013 7:24 PM, bearophile пишет: monarch_dodra: The rationale for this: std.ascii: I think returning -1 as a magic number should help keep the code faster and with less clutter than with exceptions. For the ASCII version I have two use cases: - Where I want to go fastunsafe I just use c -

Re: numericValue for (unicode) characters

2013-01-02 Thread Andrei Alexandrescu
On 1/2/13 3:13 PM, Dmitry Olshansky wrote: 1/2/2013 7:24 PM, bearophile пишет: monarch_dodra: The rationale for this: std.ascii: I think returning -1 as a magic number should help keep the code faster and with less clutter than with exceptions. For the ASCII version I have two use cases: -

Re: numericValue for (unicode) characters

2013-01-02 Thread Dmitry Olshansky
1/3/2013 12:21 AM, Andrei Alexandrescu пишет: On 1/2/13 3:13 PM, Dmitry Olshansky wrote: 1/2/2013 7:24 PM, bearophile пишет: monarch_dodra: The rationale for this: std.ascii: I think returning -1 as a magic number should help keep the code faster and with less clutter than with exceptions.

Proposal: DPM, the D Package Manager

2013-01-02 Thread Nathan M. Swan
Here's my proposal for a D Package Manager. I want to make sure it has a good design before I write any code, so here it is: http://wiki.dlang.org/User:Nathan_M._Swan/DPM_Proposal I know there are many gaps in this, I want to see which are the most important to fill. I plan to make a

about lambdas

2013-01-02 Thread Michael
R With(I, R)(I o, R function (I) fun) { static if(isAssignable!(I, typeof(null))) return o is null ? null : fun(o); else return fun(o); } class Person { private { string _name; Address _address;

Re: about lambdas

2013-01-02 Thread Maxim Fomin
On Wednesday, 2 January 2013 at 21:00:10 UTC, Michael wrote: R With(I, R)(I o, R function (I) fun) { static if(isAssignable!(I, typeof(null))) return o is null ? null : fun(o); else return fun(o); } class Person { private {

Re: Requesting for project ideas

2013-01-02 Thread deadalnix
On Wednesday, 2 January 2013 at 17:39:06 UTC, Jacob Carlborg wrote: * Since you ask and mentioned compilers I would say a lexer/parser/front end written in D. This should be usable as a library which the following could be build upon: * Syntax highlighter * Compiler * Refactoring * Static

Proposal: prettify template constraints failure messages

2013-01-02 Thread Dmitry Olshansky
The proposal is to extend template constraint from: if(expr) to if(expr; message-expr) Where the message-expr is CTFE-able expression with type string. The message-expr yields a hint string for compiler to show when instantiation failed instead of full expression that failed. It has to be

  1   2   >