On 2/29/12, James Miller ja...@aatch.net wrote:
Today I Learned that windows has insane escaping.
You won't have to worry about it for long:
https://github.com/D-Programming-Language/phobos/pull/457
On Wed, 29 Feb 2012 07:44:23 +0100, James Miller ja...@aatch.net wrote:
On 29 February 2012 19:30, simendsjo simend...@gmail.com wrote:
On Wed, 29 Feb 2012 05:03:30 +0100, Mike Parker aldac...@gmail.com
wrote:
On 2/29/2012 1:10 AM, simendsjo wrote:
On Tue, 28 Feb 2012 16:58:13 +0100,
Just noticed there's an std.traits import missing. I hate how D
silently ignores that FunctionTypeOf is left undefined.
.. That is enum E : Struct {}
struct S {
int a;
}
// ok
enum E : S {
a = S(1),
}
// Error: need member function opCmp() for struct S to compare
/*
enum E2 : S {
a = S(1),
b = S(2)
}
*/
struct S2 {
int a;
int opCmp(ref const S2 other)
{
return a == other.a
On Wed, 29 Feb 2012 12:27:32 +0100, simendsjo simend...@gmail.com wrote:
On Wed, 29 Feb 2012 12:15:35 +0100, simendsjo simend...@gmail.com
wrote:
.. That is enum E : Struct {}
struct S {
int a;
}
// ok
enum E : S {
a = S(1),
}
// Error: need member function opCmp() for struct
Dear,
I would like to parse this file:
http://genome.ucsc.edu/goldenPath/help/ItemRGBDemo.txt
struct Bed{
stringchrom;// 0
size_tchromStart; // 1
size_tchromEnd; // 2
stringname; // 3
size_tscore;// 4
Le mercredi 29 février 2012 à 12:42 +0100, bioinfornatics a écrit :
Dear,
I would like to parse this file:
http://genome.ucsc.edu/goldenPath/help/ItemRGBDemo.txt
struct Bed{
stringchrom;// 0
size_tchromStart; // 1
size_tchromEnd; // 2
On Wednesday, 29 February 2012 at 11:51:29 UTC, bioinfornatics
wrote:
Le mercredi 29 février 2012 à 12:42 +0100, bioinfornatics a
écrit :
Dear,
I would like to parse this file:
http://genome.ucsc.edu/goldenPath/help/ItemRGBDemo.txt
My problem is:
- need to parse data in csv format
- how
simendsjo:
Perhaps also the documentation for opCmp should be improved..?
Also, and maybe here DMD has to give better error messages :-)
Bye,
bearophile
On Wed, 29 Feb 2012 13:40:51 +0100, bearophile bearophileh...@lycos.com
wrote:
simendsjo:
Perhaps also the documentation for opCmp should be improved..?
Also, and maybe here DMD has to give better error messages :-)
Bye,
bearophile
Yes. Using argument types E3 doesn't make much sense
I have a need for a Cartesian product of multiple ranges. I see there's
been a discussion here (Dec 2011) as well as a request posted (#7128). It
seems to me that the request deals with a multidimensional product -- which
is what I need -- while the implementation by Timon Gehr deals only with
I've done this a couple of times before but I always had issues, e.g.
functions and property calls would be mixed in. But I think I have a
good go-to function now:
Nice. What does it give for:
- function overloads (PITA that)?
- type aliase (alias int Int;)?
- function aliases or member
James Miller Wrote:
On 29 February 2012 20:21, Jos van Uden user@domain.invalid wrote:
On 29-2-2012 7:06, James Miller wrote:
On 29 February 2012 18:51, jiccabr...@wrc.xerox.com  wrote:
Greetings!
I have this program,
import std.process : system;
import std.stdio;
int
On 2012-02-29 14:24:36 +, Philippe Sigaud said:
[snip]
Thanks for the response.
In the meantime, I also hacked together a simple version of what I
needed (see below), but I'll look into the references you provided as
well :)
void forall(alias func, size_t lvl=0, T...)(T args) {
On 2012-02-29 10:58, Andrej Mitrovic wrote:
I've done this a couple of times before but I always had issues, e.g.
functions and property calls would be mixed in. But I think I have a
good go-to function now:
import std.algorithm;
import std.conv;
import std.string;
import std.stdio;
import
I think you need the -lib in the linker command (too?).
On Feb 29, 2012 12:25 PM, André an...@s-e-a-p.de wrote:
Hi,
I use Mono-D and have a hello world example which compiles fine.
I set the compiler option -lib and receives an error undefined
reference to `_Dmain'.
Following commands are
you are right, that was the error.
Thanks.
Kind regards
André
Am 29.02.2012 18:27, schrieb Kevin Cox:
I think you need the -lib in the linker command (too?).
On Feb 29, 2012 12:25 PM, André an...@s-e-a-p.de
mailto:an...@s-e-a-p.de wrote:
Hi,
I use Mono-D and have a hello world
simendsjo:
Yes. Using argument types E3 doesn't make much sense when the named enum
is a complex type.
If this diagnostic bug/enhancement is not in Bugzilla then I suggest you to add
it. Now there are two persons that are quite efficient at fixing Bugzilla bugs,
but they need to know there
On Wednesday, February 29, 2012 12:15:35 simendsjo wrote:
.. That is enum E : Struct {}
struct S {
int a;
}
// ok
enum E : S {
a = S(1),
}
// Error: need member function opCmp() for struct S to compare
/*
enum E2 : S {
a = S(1),
b = S(2)
}
*/
struct S2 {
int a;
int
On Monday, 20 February 2012 at 11:18:34 UTC, Tyro[a.c.edwards]
wrote:
...
and I doubt you want me to put all of what dmd -v spits out
for this little script.
Thanks,
Andrew
Hi Andrew,
I ran into this problem as well and here is how I fixed/hacked it:
OSX Lion, and soon to be Mountain
On Wed, 29 Feb 2012 19:00:10 +0100, bearophile bearophileh...@lycos.com
wrote:
simendsjo:
Yes. Using argument types E3 doesn't make much sense when the named
enum
is a complex type.
If this diagnostic bug/enhancement is not in Bugzilla then I suggest you
to add it. Now there are two
On 2/29/12, Jacob Carlborg d...@me.com wrote:
Seems like what I have in my serialization library Orange:
Sweet. I was gonna take a look at Orange for just this purpose. Thanks.
On 02/28/2012 02:12 AM, Dmitry Olshansky wrote:
On 28.02.2012 2:17, Ali Çehreli wrote:
I have played with this optimization recently. (Could be dmd 2.057.) No,
dmd did not optimize a straightforward switch statement over a ubyte
expression with about two hundred ubyte cases.
Hate to say it
On 2/29/12, Philippe Sigaud philippe.sig...@gmail.com wrote:
Nice. What does it give for:
- function overloads (PITA that)?
- type aliase (alias int Int;)?
- function aliases or member aliases?
- inner templates (struct template, etc, not pure template as these are not
allowed in a struct)?
On 2/29/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote:
Just noticed it doesn't work ok if there's a nested template
declaration in a struct. It would say Error: cannot resolve type for
t.temp(T).
Correction: it was the unittest block that was problematic. I've filed
it
hello,
I want to use raw sockets but there is a lack of documentation on how to
use them in D.
Is there somewhere I can read more about them or has someone succesfully
used them?
Thank you,
maarten
http://www.digitalmars.com/ctg/trace.html
Has someone made some GUI/pretty printing/dump to database or other tools
to make the profile data a bit simpler to digest?
Am 29.02.2012 20:44, schrieb maarten van damme:
hello,
I want to use raw sockets but there is a lack of documentation on how to
use them in D.
Is there somewhere I can read more about them or has someone succesfully
used them?
Thank you,
maarten
Hello,
I would use libpcap for that, since
I've tried porting libcap once but I failed miserably. If I'd succeed in
porting they wouldn't be of good quality.
On 29/02/2012 19:41, simendsjo wrote:
http://www.digitalmars.com/ctg/trace.html
Has someone made some GUI/pretty printing/dump to database or other
tools to make the profile data a bit simpler to digest?
If you're on Windows you could try:
http://h3.gd/code/xfProf/
Although I don't believe
On Wed, 29 Feb 2012 22:28:29 +0100, Robert Clipsham
rob...@octarineparrot.com wrote:
On 29/02/2012 19:41, simendsjo wrote:
http://www.digitalmars.com/ctg/trace.html
Has someone made some GUI/pretty printing/dump to database or other
tools to make the profile data a bit simpler to digest?
Boom: https://bitbucket.org/stqn/profiled
I've never used it though.
On 1 March 2012 10:05, maarten van damme maartenvd1...@gmail.com wrote:
I've tried porting libcap once but I failed miserably. If I'd succeed in
porting they wouldn't be of good quality.
Not porting, writing bindings for it. Its pretty easy. just convert
the declarations into D extern (C) {
thank you, I'll give it a try.
One of my previous attempts failed because I didn't know what was really
needed to include in the bindings and what was excess. I'm going to post
what I have in a week, hope it works out.
On Thursday, March 01, 2012 00:17:55 Robert Clipsham wrote:
Just as a side note, -profile doesn't work with multi-threaded
applications, so using some other profiler would probably be a better
bet anyway.
It doesn't work with 64-bit programs either.
- Jonathan M Davis
Le mercredi 29 février 2012 à 13:23 +0100, Jesse Phillips a écrit :
On Wednesday, 29 February 2012 at 11:51:29 UTC, bioinfornatics
wrote:
Le mercredi 29 février 2012 à 12:42 +0100, bioinfornatics a
écrit :
Dear,
I would like to parse this file:
Do you know why std.array.Appender defines a put method instead of
overloading the ~= operator?
Bye and thank you,
bearophile
On Wednesday, February 29, 2012 20:25:35 bearophile wrote:
Do you know why std.array.Appender defines a put method instead of
overloading the ~= operator?
put is a function on output ranges, and Appender is an output range.
- Jonathan M Davis
Luckily you can always use alias this and overload opCatAssign. 'alias
this' is a great tool for customizing APIs. :)
On Wednesday, February 29, 2012 20:53:04 Jonathan M Davis wrote:
On Wednesday, February 29, 2012 20:25:35 bearophile wrote:
Do you know why std.array.Appender defines a put method instead of
overloading the ~= operator?
put is a function on output ranges, and Appender is an output range.
Le jeudi 01 mars 2012 à 01:52 +0100, bioinfornatics a écrit :
Le mercredi 29 février 2012 à 13:23 +0100, Jesse Phillips a écrit :
On Wednesday, 29 February 2012 at 11:51:29 UTC, bioinfornatics
wrote:
Le mercredi 29 février 2012 à 12:42 +0100, bioinfornatics a
écrit :
Dear,
I
Jonathan M Davis:
put is a function on output ranges, and Appender is an output range.
Also, given that it doesn't define ~ (and it wouldn't really make sense for
it
to), it would be very weird IMHO to define ~=.
I don't understand why that's weird.
In Java you can't overload an append
On Thursday, 1 March 2012 at 02:23:55 UTC, bearophile wrote:
But for me it's weird that Appender doesn't use the D operator
to _append_. [...] I suggest to give it both put method and
~= operator.
I agree entirely.
Another annoyance is if you have a function that works on
regular arrays,
On Wednesday, February 29, 2012 21:23:54 bearophile wrote:
Jonathan M Davis:
put is a function on output ranges, and Appender is an output range.
Also, given that it doesn't define ~ (and it wouldn't really make sense
for it to), it would be very weird IMHO to define ~=.
I don't
On Thursday, March 01, 2012 03:29:06 Adam D. Ruppe wrote:
On Thursday, 1 March 2012 at 02:23:55 UTC, bearophile wrote:
But for me it's weird that Appender doesn't use the D operator
to _append_. [...] I suggest to give it both put method and
~= operator.
I agree entirely.
Another
On Thursday, 1 March 2012 at 02:44:35 UTC, Jonathan M Davis wrote:
True, but it can't do all of the other operations that array
can do either.
Yeah, but the one operation it replaces, ~=, can be done
on an array.
If you're trying to convert array code to Appender for
speed, most likely you're
In C++ this works:
struct test
{
unsigned int h : 2;
};
int main()
{
test b;
b.h = 0;
for(int i = 0;i 10;i++)
++b.h;
return 0;
}
In D this throws an exception as soon as it wraps:
struct test
{
mixin(bitfields!(
On 1 March 2012 15:49, Adam D. Ruppe destructiona...@gmail.com wrote:
On Thursday, 1 March 2012 at 02:44:35 UTC, Jonathan M Davis wrote:
True, but it can't do all of the other operations that array can do
either.
Yeah, but the one operation it replaces, ~=, can be done
on an array.
If
On 1 March 2012 16:15, ixid nuacco...@gmail.com wrote:
In C++ this works:
struct test
{
unsigned int h : 2;
};
int main()
{
test b;
b.h = 0;
for(int i = 0;i 10;i++)
++b.h;
return 0;
}
In D this throws an exception as soon as it
On 02/29/2012 08:28 PM, James Miller wrote:
I understand that Appenders aren't arrays, and should not be used as
such, but you /can/ use an array as an Appender.
Yes you can but whatever you put() into the array is immediately
popFront()'ed from the array. ;) You must use a temporary
50 matches
Mail list logo