Ah ok.
Hey if it's used for something useful I won't steal it from you. ;)
On 5/23/2011 2:17 AM, Simen Kjaeraas wrote:
On Sat, 21 May 2011 11:40:22 +0200, Matthew Ong on...@yahoo.com wrote:
Using your code I have this error:
src\Sample.d(16): Error: undefined identifier btype, did you mean
template AType(string name,U,alias V)?
src\Sample.d(16): Error: mixin
On 2011-05-23 00:09, Matthew Ong wrote:
On 5/21/2011 7:16 PM, Russel Winder wrote:
On Sat, 2011-05-21 at 04:35 -0400, Nick Sabalausky wrote:
[ . . . ]
Subversion handles multiple people editing the same file perfectly fine.
But Hg probably is better than SVN, overall. I've been a happy
On 5/21/2011 11:27 PM, Robert Clipsham wrote:
On 21/05/2011 09:58, Jonathan M Davis wrote:
On 2011-05-21 01:04, Matthew Ong wrote:
Hi,
D has major potential to replace C/C++ at the system API level.
What I can see D is doing now is trying to glue to the existing C API
instead of replacing
On 5/23/11, Matthew Ong on...@yahoo.com wrote:
Someone also pointed out:
template mydef(string name){
}
mixin(mydef!(abc));
The above are NOT shown up left hand side of that when we click on
Language Reference
You're probably looking for this:
http://www.digitalmars.com/d/2.0/mixin.html
Hi Digitalmars/Walter Bright,
http://www.digitalmars.com/d/2.0/hijack.html
This talk covers function hijacking, where adding innocent and
reasonable declarations in a module can wreak arbitrary havoc on an
application program in C++(maybe true) and Java(not true).
Since I have not done C++
Hi ALL Java D Newbie,
http://www.dsource.org/projects/dwt
Do a Mercurial Hg Clone of:
hg clone http://hg.dsource.org/projects/dwt2
Once done. dwt2 will be the top level directory of that clone.
Look inside:
dwt2\base\src\java
There are many buildin java like classes written nicely in D
On 5/23/2011 3:58 PM, Timon Gehr wrote:
On 2011-05-23 00:09, Matthew Ong wrote:
Thanks everyone that gave some working model to a newbie from Java Space.
I found the working file layout model from dwt2
http://hg.dsource.org/projects/dwt2
There is a dwt2\base\src
Haha. That is exactly like
On Sun, 22 May 2011 11:20:15 -0400, Timon Gehr timon.g...@gmx.ch wrote:
Andrej Mitrovic wrote:
Should I file a bug report to kill this syntax?
No. It is perfectly valid, see grammar:
http://www.digitalmars.com/d/2.0/declaration.html
What is strange about this syntax in particular?
int i;
On 2011-05-23 11:32, Matthew Ong wrote:
Hi ALL Java D Newbie,
http://www.dsource.org/projects/dwt
Do a Mercurial Hg Clone of:
hg clone http://hg.dsource.org/projects/dwt2
Once done. dwt2 will be the top level directory of that clone.
Look inside:
dwt2\base\src\java
There are many buildin
Steven Schveighoffer wrote:
It is not perfectly consistent. The function type syntax is useless,
because you can only use it if you use the pointer modifier with it. If
you want to declare a function pointer, there are other (better) ways.
Yes, other ways of declaring a function pointer are
On 5/23/11, Timon Gehr timon.g...@gmx.ch wrote:
BTW:
writeln(typeid(int function(int))); //int()*
wtf?
Yeah, typeid generally seems to be bad for these things.
typeof.stringof to the rescue:
writeln((int function(int)).stringof); // int function(int)
Well if there's no better way to do it and it's useful, we should do a
feature request for a better syntax, no?
On Mon, 23 May 2011 09:32:47 -0400, Timon Gehr timon.g...@gmx.ch wrote:
Steven Schveighoffer wrote:
it's akin to
making:
if(x);
invalid. Yes, it's valid syntax, but it's almost certainly not what the
user wanted. It's special cased for failure, to aid the developer in
writing less buggy
On Mon, 23 May 2011 09:59:01 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Mon, 23 May 2011 09:32:47 -0400, Timon Gehr timon.g...@gmx.ch wrote:
Steven Schveighoffer wrote:
it's akin to
making:
if(x);
invalid. Yes, it's valid syntax, but it's almost certainly not what the
user
On Mon, May 23, 2011 at 4:39 AM, Matthew Ong on...@yahoo.com wrote:
On 5/23/2011 3:58 PM, Timon Gehr wrote:
On 2011-05-23 00:09, Matthew Ong wrote:
Thanks everyone that gave some working model to a newbie from Java Space.
I found the working file layout model from dwt2
On Mon, 23 May 2011 10:50:11 -0400, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
Since main can't be a template value argument, maybe he meant this use
case:
alias int func();
void foo(alias T)()
{
static assert(is(typeof(T) == int function())); // fixed
}
int main()
{
Nice.
This looks really interesting -- this will be obvious from my question -- I am a
hobbyist programmer interested in D (with most experience in Python).
I can get the first cgi example (not the mixin) to compile and run on an Apache
cgi server.
I cannot get the second, cgi/mixin sample to compile.
Nathan wrote:
I cannot get the second, cgi/mixin sample to compile. What is the
appropriate dmd command line?
First, download my cgi module
http://arsdnet.net/dcode/cgi.d
Then, in the same directory write this file, hello.d:
===
import arsd.cgi;
void whatever(Cgi cgi) {
Also:
other two errors say that modulename.run cannot be called with
argument type Cgi and that 0 arguments are expected for function type void
When using the generic main mixin, the function you pass must
always take one argument: a Cgi object.
void yourFunctionHere(Cgi cgi) { }
When the
Steven Schveighoffer wrote:
On Mon, 23 May 2011 10:50:11 -0400, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
Since main can't be a template value argument, maybe he meant this use
case:
alias int func();
void foo(alias T)()
{
static assert(is(typeof(T) == int function())); //
On Mon, 23 May 2011 14:06:31 -0400, Timon Gehr timon.g...@gmx.ch wrote:
Steven Schveighoffer wrote:
On Mon, 23 May 2011 10:50:11 -0400, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
Since main can't be a template value argument, maybe he meant this use
case:
alias int func();
void
I've cloned Phobos just a few minutes ago, and I've tried to build it with
unittests, I'm getting these:
Warning: AutoImplement!(C_6) ignored variadic arguments to the constructor
C_6(...)
--- std.socket(316) broken test ---
--- std.regex(3671) broken test ---
So what's the procedure now? Do
Also, David, your multithreaded unittest is gonna fry my CPU! It's
getting hot these days.. :)
On 22/05/2011 21:51, Timon Gehr wrote:
snip
I suspect what Andrej actually meant is to kill treating function
signatures as types in this way. And possibly enhancement
request rather than bug.
It is the opposite of an enhancement request. It means removing a
feature that cannot be
26 matches
Mail list logo