[GSOC] Container Project

2011-03-31 Thread Ian Bishop
Hi, My name is Ian Bishop and I'm a 4th year BCS student at the University of New Brunswick. I'm interested in the GSOC Project of working on containers for D. This sort of project is right up my alley, my major is Theory and Computation and I have taken related courses such as data structures,

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-31 Thread Andrej Mitrovic
Ok this is the thing that really gets me with CTFE: void printFields(T)(T t) { enum fields = [__traits(allMembers, T)]; foreach (string field; fields) { mixin("writeln(t." ~ to!string(field) ~ ");"); // fail mixin("writeln(t." ~ to!string(fields[0]) ~ ");"); // o

Re: GCC 4.6

2011-03-31 Thread bearophile
Christopher Bergqvist: > Why not split this NG in two? > d-pragmatism - Concrete stuff, TDPL + absolutely necessary adjustments > which are probably discussed first in the other ng... > d-theory - A place to discuss the future of D, stuff with a longer timeline. > > Or maybe we should accept this

Re: Asynchronicity in D

2011-03-31 Thread Max Klyga
On 2011-04-01 01:45:54 +0300, Jonas Drewsen said: On 31/03/11 23.20, Max Klyga wrote: On 2011-03-31 22:35:43 +0300, Jonas Drewsen said: On 31/03/11 18.26, Andrei Alexandrescu wrote: snip I believe that we would need both the threaded async IO that you describe but also a select based one.

Re: shared and cryptic error messages

2011-03-31 Thread Jose Armando Garcia
On Thu, Mar 31, 2011 at 7:59 PM, Jason House wrote: > Jose Armando Garcia Wrote: > >> On Wed, Mar 30, 2011 at 9:39 PM, Jason House >> wrote: >> > Jose Armando Garcia Wrote: >> > >> >> How do I get around this error? >> > >> > That's not easy to answer...  To get the compiler to shut up, you can c

Re: Asynchronicity in D

2011-03-31 Thread dsimcha
== Quote from Jonas Drewsen (jdrew...@nospam.com)'s article > On 31/03/11 23.20, Max Klyga wrote: > > On 2011-03-31 22:35:43 +0300, Jonas Drewsen said: > > > >> On 31/03/11 18.26, Andrei Alexandrescu wrote: > >>> snip > >> > >> I believe that we would need both the threaded async IO that you > >> d

Re: Asynchronicity in D

2011-03-31 Thread dsimcha
== Quote from Sean Kelly (s...@invisibleduck.org)'s article > On Mar 31, 2011, at 11:48 AM, dsimcha wrote: > > == Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s > article > >> Are fibers really better/faster than threads? I've heard rumors that > >> they perform exactly the same, and tha

std.event

2011-03-31 Thread teo
https://github.com/teo-/phobos/tree/std-event Instead of changing std.signals I decided to insert a new module and call it std.event. There is a problem though: The observers are notified via delegates when the event is fired. And if an observer is destroyed the event will be left with a dangl

Re: shared and cryptic error messages

2011-03-31 Thread Jason House
Jose Armando Garcia Wrote: > On Wed, Mar 30, 2011 at 9:39 PM, Jason House > wrote: > > Jose Armando Garcia Wrote: > > > >> How do I get around this error? > > > > That's not easy to answer...  To get the compiler to shut up, you can copy > > and paste FILE's destructor and mark it as shared.  Of

Re: Asynchronicity in D

2011-03-31 Thread Jonas Drewsen
On 31/03/11 23.20, Max Klyga wrote: On 2011-03-31 22:35:43 +0300, Jonas Drewsen said: On 31/03/11 18.26, Andrei Alexandrescu wrote: snip I believe that we would need both the threaded async IO that you describe but also a select based one. The thread based is important e.g. in order to keep

Re: Asynchronicity in D

2011-03-31 Thread Sean Kelly
On Mar 31, 2011, at 11:48 AM, dsimcha wrote: > == Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article >> Are fibers really better/faster than threads? I've heard rumors that >> they perform exactly the same, and that there's no benefit of using >> fibers over threads. Is that true? >

Re: Asynchronicity in D

2011-03-31 Thread Max Klyga
On 2011-03-31 22:35:43 +0300, Jonas Drewsen said: On 31/03/11 18.26, Andrei Alexandrescu wrote: snip I believe that we would need both the threaded async IO that you describe but also a select based one. The thread based is important e.g. in order to keep buffering incoming data while proce

Re: Asynchronicity in D

2011-03-31 Thread Max Klyga
On 2011-03-31 19:26:45 +0300, Andrei Alexandrescu said: On 3/31/11 6:35 AM, Max Klyga wrote: snip I think that would be a good contribution that would complement Jonas'. You'll need to discuss cooperation with him and at best Jonas would agree to become a mentor. Jonas agreed to become a

Re: [GSOC idea] enhance regular expressions?

2011-03-31 Thread Dmitry Olshansky
On 31.03.2011 22:16, petevi...@yahoo.com.au wrote: Dmitry Olshansky writes: --- somewhat informal draft --- Hi Dmitry, It's good to know that there is interest in improving regular expressions in the D standard library. I've run into a number of problems using std.regex myself, so I'm keen s

Re: GCC 4.6

2011-03-31 Thread Christopher Bergqvist
Why not split this NG in two? d-pragmatism - Concrete stuff, TDPL + absolutely necessary adjustments which are probably discussed first in the other ng... d-theory - A place to discuss the future of D, stuff with a longer timeline. Or maybe we should accept this NG for being a mix of both and that

Re: [GSoC Proposal draft] High-Level Networking

2011-03-31 Thread Jonas Drewsen
On 30/03/11 23.58, Max Klyga wrote: I read your "Curl RFC" thread, great job. Somehow I missed it when it was originaly posted. As you stated earlier, you plan to continue working on your curl wrapper, so to boost my proposal usefullness I think it needs to address unsolved problems. Could you

Re: Asynchronicity in D

2011-03-31 Thread Jonas Drewsen
On 31/03/11 21.19, Torarin wrote: I'm currently working on an http and networking library that uses asynchronous sockets running in fibers and an event loop a la libev. These async sockets have the same interface as regular Berkeley sockets, so clients can choose whether to be synchronous, asynch

Re: Asynchronicity in D

2011-03-31 Thread Jonas Drewsen
On 31/03/11 20.48, dsimcha wrote: == Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article Are fibers really better/faster than threads? I've heard rumors that they perform exactly the same, and that there's no benefit of using fibers over threads. Is that true? Here are some key d

Re: Asynchronicity in D

2011-03-31 Thread Jonas Drewsen
On 31/03/11 18.26, Andrei Alexandrescu wrote: On 3/31/11 6:35 AM, Max Klyga wrote: I've been thinking on things I can change in my GSoC proposal to make it stronger and noticed that currently Phobos does not address asynchronous I/O of any kind. A number of threads on thid newsgroup mentioned a

Re: shared and cryptic error messages

2011-03-31 Thread Jose Armando Garcia
On Wed, Mar 30, 2011 at 9:39 PM, Jason House wrote: > Jose Armando Garcia Wrote: > >> Why am I getting this error? I suspect that synchronized is the >> problem. > > A synchronized class is implicitly shared and most of the methods are > synchronized.  I say most because at a minimum, the constru

Re: shared and cryptic error messages

2011-03-31 Thread Jose Armando Garcia
Adding a shared dtor to File doesn't sound like the correct solution. On Wed, Mar 30, 2011 at 8:14 PM, KennyTM~ wrote: > On Mar 31, 11 06:34, Jason House wrote: >> >> he compiler wants "argument types () shared" instead of "argument types >> ()". It's an awful error message, and I'm certain I fil

Re: Asynchronicity in D

2011-03-31 Thread Torarin
I'm currently working on an http and networking library that uses asynchronous sockets running in fibers and an event loop a la libev. These async sockets have the same interface as regular Berkeley sockets, so clients can choose whether to be synchronous, asynchronous or threaded with template arg

Re: shared and cryptic error messages

2011-03-31 Thread Jose Armando Garcia
First of all, thanks for the reply. That means that it is imposible to use a struct or class that overrides ~this() inside of a synchronized class. As long as I take the extra care of making sure that I don't expose an object of this class/struct outside of the synchronized class. It is impossible

Re: Asynchronicity in D

2011-03-31 Thread Steven Schveighoffer
On Thu, 31 Mar 2011 14:48:13 -0400, dsimcha wrote: == Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article Are fibers really better/faster than threads? I've heard rumors that they perform exactly the same, and that there's no benefit of using fibers over threads. Is that true?

Re: Asynchronicity in D

2011-03-31 Thread dsimcha
== Quote from Andrej Mitrovic (andrej.mitrov...@gmail.com)'s article > Are fibers really better/faster than threads? I've heard rumors that > they perform exactly the same, and that there's no benefit of using > fibers over threads. Is that true? Here are some key differences between fibers (as cu

Re: Asynchronicity in D

2011-03-31 Thread Andrej Mitrovic
Are fibers really better/faster than threads? I've heard rumors that they perform exactly the same, and that there's no benefit of using fibers over threads. Is that true?

Re: [GSOC idea] enhance regular expressions?

2011-03-31 Thread petevik38
Dmitry Olshansky writes: > --- somewhat informal draft --- > Hi Dmitry, It's good to know that there is interest in improving regular expressions in the D standard library. I've run into a number of problems using std.regex myself, so I'm keen so see either fixes for std.regex or an improved rep

Re: D grammar overhaul

2011-03-31 Thread Jonathan M Davis
On 2011-03-31 11:04, Brad Roberts wrote: > On 3/31/2011 10:34 AM, Jonathan M Davis wrote: > > On 2011-03-31 02:32, Trass3r wrote: > >> Rainer Schuetze Wrote: > >>> How can I contribute patches? I guess this would be with pull > >>> requests, so I'll need a github repository, too? The discussion pag

Re: D grammar overhaul

2011-03-31 Thread Brad Roberts
On 3/31/2011 10:34 AM, Jonathan M Davis wrote: > On 2011-03-31 02:32, Trass3r wrote: >> Rainer Schuetze Wrote: >>> How can I contribute patches? I guess this would be with pull >>> requests, so I'll need a github repository, too? The discussion page for >>> pull requests looks like a nice feature..

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread Jonathan M Davis
On 2011-03-31 06:35, Kagamin wrote: > Ary Manzana Wrote: > > I just hate it when you have to write too much > > hasMember!(S, "m") > is only 1 character longer than > S::hasMember("m") > > not too much for me And hasMember!(S, "m") is actually consistent with the rest of the language and straig

Re: D grammar overhaul

2011-03-31 Thread Jonathan M Davis
On 2011-03-31 02:32, Trass3r wrote: > Rainer Schuetze Wrote: > > How can I contribute patches? I guess this would be with pull > > requests, so I'll need a github repository, too? The discussion page for > > pull requests looks like a nice feature... > > Yep, you fork the original repo and apply y

Re: A few thoughts on the existing GSoC student proposals

2011-03-31 Thread Piotr Szturmaj
Andrei Alexandrescu wrote: 4. Database API This is a high impact item. I'd need to collect more information about the specifics of the application before creating an opinion about its chances of success. I see Piotr and others have some related ideas; I suggest them to apply appropriately (eithe

Re: Asynchronicity in D

2011-03-31 Thread Robert Clipsham
On 31/03/2011 17:53, Robert Clipsham wrote: On 31/03/2011 17:26, Andrei Alexandrescu wrote: foreach (line; byLineAsync("http://d-programming-language.org";)) { ... use line ... } What would be awesome is if this was backed by fibers, then you have a really simple and easy wrapper for doing asy

Re: Asynchronicity in D

2011-03-31 Thread Robert Clipsham
On 31/03/2011 17:26, Andrei Alexandrescu wrote: foreach (line; byLineAsync("http://d-programming-language.org";)) { ... use line ... } What would be awesome is if this was backed by fibers, then you have a really simple and easy wrapper for doing async io, handling lots of connections as the

Re: Asynchronicity in D

2011-03-31 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > On 3/31/11 11:43 AM, dsimcha wrote: > > == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > >> On 3/31/11 6:35 AM, Max Klyga wrote: > >>> I've been thinking on things I can change in my GSoC prop

Re: Asynchronicity in D

2011-03-31 Thread Andrei Alexandrescu
On 3/31/11 11:43 AM, dsimcha wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article On 3/31/11 6:35 AM, Max Klyga wrote: I've been thinking on things I can change in my GSoC proposal to make it stronger and noticed that currently Phobos does not address asynchronous

Re: Asynchronicity in D

2011-03-31 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > On 3/31/11 6:35 AM, Max Klyga wrote: > > I've been thinking on things I can change in my GSoC proposal to make it > > stronger and noticed that currently Phobos does not address asynchronous > > I/O of any kind. > > > > A

Re: Asynchronicity in D

2011-03-31 Thread Andrei Alexandrescu
On 3/31/11 6:35 AM, Max Klyga wrote: I've been thinking on things I can change in my GSoC proposal to make it stronger and noticed that currently Phobos does not address asynchronous I/O of any kind. A number of threads on thid newsgroup mentioned about this problem or shown ways other languages

Re: Review of std.net.isemail part 2

2011-03-31 Thread Jacob Carlborg
On 2011-03-31 01:12, Jonathan M Davis wrote: On 2011-03-30 15:27, Andrei Alexandrescu wrote: On 3/30/11 5:24 PM, bearophile wrote: Andrei: Beyond naming: Some standard for member attributes? Like m_something, etc? I don't like this a lot, but having a style guide on this too is useful for Pho

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread Jacob Carlborg
On 2011-03-31 01:05, KennyTM~ wrote: On Mar 31, 11 06:32, Ary Manzana wrote: On 3/30/11 5:52 PM, KennyTM~ wrote: On Mar 31, 11 04:19, Alix Pexton wrote: On 30/03/2011 20:45, KennyTM~ wrote: This is confusing as :: is used to separate scopes in C++ (and PHP too). The first thing it reminded

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread Jacob Carlborg
On 2011-03-31 00:32, Ary Manzana wrote: On 3/30/11 5:52 PM, KennyTM~ wrote: On Mar 31, 11 04:19, Alix Pexton wrote: On 30/03/2011 20:45, KennyTM~ wrote: This is confusing as :: is used to separate scopes in C++ (and PHP too). The first thing it reminded me of was Lua, where a single colon ma

Re: opSlice() magic for foreach now works?

2011-03-31 Thread Jacob Carlborg
On 2011-03-30 22:35, Mafi wrote: Am 30.03.2011 20:35, schrieb Jacob Carlborg: On 2011-03-30 16:47, David Nadlinger wrote: On 3/30/11 4:43 PM, Jacob Carlborg wrote: Do we have three ways now to implement iteration, opApply, opSlice and ranges? Wouldn't opSlice only be syntatic sugar for range

Re: Asynchronicity in D

2011-03-31 Thread Aleksandar Ružičić
I really like design of node.js (http://nodejs.org) it's internally based on libev and everything runs in a single-threaded event loop. It's proven to be highly concurrent and memory efficient. Maybe a wrapper around libev(ent) for D ala node.js would be good solution for asynchronous API, other t

Re: Asynchronicity in D

2011-03-31 Thread Piotr Szturmaj
dsimcha wrote: == Quote from Piotr Szturmaj (bncr...@jadamspam.pl)'s article Max Klyga wrote: I've been thinking on things I can change in my GSoC proposal to make it stronger and noticed that currently Phobos does not address asynchronous I/O of any kind. A number of threads on thid newsgroup

Re: Asynchronicity in D

2011-03-31 Thread Aleksandar Ružičić
I really like design of node.js (http://nodejs.org) it's internally based on libev and everything runs in a single-threaded event loop. It's proven to be highly concurrent and memory efficient. Maybe a wrapper around libev(ent) for D ala node.js would be good solution for asynchronous API, other t

Re: Asynchronicity in D

2011-03-31 Thread dsimcha
== Quote from Piotr Szturmaj (bncr...@jadamspam.pl)'s article > Max Klyga wrote: > > I've been thinking on things I can change in my GSoC proposal to make it > > stronger and noticed that currently Phobos does not address asynchronous > > I/O of any kind. > > > > A number of threads on thid newsgro

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread Steven Schveighoffer
On Thu, 31 Mar 2011 10:39:29 -0400, Andrei Alexandrescu wrote: On 03/31/2011 09:27 AM, Steven Schveighoffer wrote: On Thu, 31 Mar 2011 10:16:58 -0400, Andrei Alexandrescu wrote: On 03/31/2011 03:52 AM, bearophile wrote: KennyTM~: I think the GSoC group and language feature discussion g

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread Andrei Alexandrescu
On 03/31/2011 09:27 AM, Steven Schveighoffer wrote: On Thu, 31 Mar 2011 10:16:58 -0400, Andrei Alexandrescu wrote: On 03/31/2011 03:52 AM, bearophile wrote: KennyTM~: I think the GSoC group and language feature discussion group should be separated. Regarding D/Phobos feature discussions,

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread Steven Schveighoffer
On Thu, 31 Mar 2011 10:16:58 -0400, Andrei Alexandrescu wrote: On 03/31/2011 03:52 AM, bearophile wrote: KennyTM~: I think the GSoC group and language feature discussion group should be separated. Regarding D/Phobos feature discussions, they don't damage the summer of code discussions si

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread Andrei Alexandrescu
On 03/31/2011 03:52 AM, bearophile wrote: KennyTM~: I think the GSoC group and language feature discussion group should be separated. Regarding D/Phobos feature discussions, they don't damage the summer of code discussions significantly because they put in use almost a different part of the b

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread Ary Manzana
On 3/31/11 10:35 AM, Kagamin wrote: Ary Manzana Wrote: I just hate it when you have to write too much hasMember!(S, "m") is only 1 character longer than S::hasMember("m") not too much for me Ah, so then I change it to: S::hm("M")

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread Kagamin
Ary Manzana Wrote: > I just hate it when you have to write too much hasMember!(S, "m") is only 1 character longer than S::hasMember("m") not too much for me

Re: expression templates

2011-03-31 Thread enuhtac
Am 29.03.2011 21:15, schrieb dsimcha: > == Quote from bearophile (bearophileh...@lycos.com)'s article >> The operator overloading done with opCmp is too much coarse even if you want >> to > implement sets with operators like <= < > >= == for subset, etc. > > Can you please give an example of where

Re: Asynchronicity in D

2011-03-31 Thread Piotr Szturmaj
Max Klyga wrote: I've been thinking on things I can change in my GSoC proposal to make it stronger and noticed that currently Phobos does not address asynchronous I/O of any kind. A number of threads on thid newsgroup mentioned about this problem or shown ways other languages address asynchronic

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread spir
On 03/31/2011 05:24 AM, Andrei Alexandrescu wrote: My problem is that when you start using D's cool features you end up with a really hard to understand and obscure code... I understand and to a good extent agree with the sentiment. Pleased to read that :-) I've had this sentiment for a while

Asynchronicity in D

2011-03-31 Thread Max Klyga
I've been thinking on things I can change in my GSoC proposal to make it stronger and noticed that currently Phobos does not address asynchronous I/O of any kind. A number of threads on thid newsgroup mentioned about this problem or shown ways other languages address asynchronicity. I want t

Re: D grammar overhaul

2011-03-31 Thread Trass3r
Rainer Schuetze Wrote: > How can I contribute patches? I guess this would be with pull > requests, so I'll need a github repository, too? The discussion page for > pull requests looks like a nice feature... Yep, you fork the original repo and apply your changes. Once you think you're somewhat d

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread bearophile
KennyTM~: > I think the GSoC group and language feature discussion group should be > separated. Regarding D/Phobos feature discussions, they don't damage the summer of code discussions significantly because they put in use almost a different part of the brain. The skills and attention required

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread so
On Wed, 30 Mar 2011 22:28:27 +0300, Ary Manzana wrote: I think :: is not used in the language. In a recent article about D I saw: mixin(__traits(identifier, T) ~ " " ~ to!string(tolower(__traits(identifier, T)[0])) ~ __traits(identifier, T)[1..$] ~ ";"); What if foo::bar were

Re: GCC 4.6

2011-03-31 Thread so
On Thu, 31 Mar 2011 05:09:44 +0300, jasonw wrote: You hit the nail on the head here. I see two real problems with his messages: 1) he's "force fitting" every possible language feature he learns into D. Clearly some features are useful, others are not, and this is why many of bearophile's

Re: Review of std.net.isemail part 2

2011-03-31 Thread Jonathan M Davis
On 2011-03-31 00:09, Jacob Carlborg wrote: > On 3/30/11 10:07 PM, Andrei Alexandrescu wrote: > > On 3/30/11 2:47 PM, Jonathan M Davis wrote: > >> I've tried to get Andrei to agree to a style guide a few times, but he's > >> generally pushed back on it. I definitely think that we should have > >> on

Re: D grammar overhaul

2011-03-31 Thread Rainer Schuetze
Trass3r wrote: Original discussion forked in the D grammar thread, so I'm opening a new one for this specific issue. The D grammar is in dire need of an overhaul. I suggest we discuss changes here and then put everything into github to issue a pull request once everything's done. I already fo

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread Jacob Carlborg
On 3/30/11 9:28 PM, Ary Manzana wrote: I think :: is not used in the language. In a recent article about D I saw: mixin(__traits(identifier, T) ~ " " ~ to!string(tolower(__traits(identifier, T)[0])) ~ __traits(identifier, T)[1..$] ~ ";"); What if foo::bar were an alias for __traits(foo, bar) ?

Re: __traits so long and ugly, what about ::?

2011-03-31 Thread Jacob Carlborg
On 3/30/11 9:45 PM, KennyTM~ wrote: On Mar 31, 11 03:28, Ary Manzana wrote: I think :: is not used in the language. In a recent article about D I saw: mixin(__traits(identifier, T) ~ " " ~ to!string(tolower(__traits(identifier, T)[0])) ~ __traits(identifier, T)[1..$] ~ ";"); What if foo::bar

Re: Review of std.net.isemail part 2

2011-03-31 Thread Jacob Carlborg
On 3/30/11 10:07 PM, Andrei Alexandrescu wrote: On 3/30/11 2:47 PM, Jonathan M Davis wrote: I've tried to get Andrei to agree to a style guide a few times, but he's generally pushed back on it. I definitely think that we should have one if we want to actually have a consistent style, but thus fa

Re: Review of std.net.isemail part 2

2011-03-31 Thread Jacob Carlborg
On 3/30/11 9:42 PM, Andrei Alexandrescu wrote: On 3/30/11 1:47 PM, Jacob Carlborg wrote: So, should I change the enum members to start with lowercase or leave it like it is? Change please. Thanks, Andrei Ok, will do. -- /Jacob Carlborg