On 12-06-2012 08:29, Jacob Carlborg wrote:
On 2012-06-12 04:20, Ary Manzana wrote:
I believe no special comment is needed for this. If you override a
method without commenting it it should retain the original comment. If
you do comment it, it should take that new comment.
Sounds like a good i
On 2012-06-12 04:20, Ary Manzana wrote:
I believe no special comment is needed for this. If you override a
method without commenting it it should retain the original comment. If
you do comment it, it should take that new comment.
Sounds like a good idea. I wonder though, if a special comment i
Does a switch statement acting on a template parameter act just
like a chain of static if-else's? That is, does it just generate
the code for the matching case?
enum E { A, B, C }
class Blah(E param) {
void foo() {
switch(param) {
case(E.A) : blah;
case(E.B) :
def
On 12-06-2012 04:20, Charles McAnany wrote:
Hi, all. I'm studying Kerrisk's The Linux Programming Interface for fun.
The book is written in C, and I thought it would be fun to do the
exercises in D. My problem is that I'm doing things like
#include
in my C code and that loads oodles of macros li
On 6/12/12 8:59 , Alex Rønne Petersen wrote:
Hi,
Suppose I have:
abstract class A
{
/// My very long and helpful documentation.
void foo();
}
class B : A
{
override void foo()
{
}
}
Is there any way I can instruct Ddoc to copy the documentation from
A.foo to B.foo? Copying it over manually is
Hi, all. I'm studying Kerrisk's The Linux Programming Interface
for fun. The book is written in C, and I thought it would be fun
to do the exercises in D. My problem is that I'm doing things like
#include
in my C code and that loads oodles of macros like ssize_t,
O_RDONLY, EXIT_SUCCESS, etc.
On Tuesday, June 12, 2012 02:59:05 Alex Rønne Petersen wrote:
> Hi,
>
> Suppose I have:
>
> abstract class A
> {
> /// My very long and helpful documentation.
> void foo();
> }
>
> class B : A
> {
> override void foo()
> {
> }
> }
>
> Is there any way I can instruct Ddoc to copy the documentati
On 6/12/12, Alex Rønne Petersen wrote:
> Would be neat if you could do something like ditto:
>
> /// inherit
> override void foo()
> {
> }
Maybe we should have "// super ditto" :)
Hi,
Suppose I have:
abstract class A
{
/// My very long and helpful documentation.
void foo();
}
class B : A
{
override void foo()
{
}
}
Is there any way I can instruct Ddoc to copy the documentation from
A.foo to B.foo? Copying it over manually is a maintenance nightmare.
On 12-06-2012 02:04, bearophile wrote:
Do you know why D templates accept floating point values and even arrays
of 32 bit dchars:
template Foo(dchar[] s) {
enum size_t Foo = s.length;
}
void main() {
pragma(msg, Foo!("hello"d.dup));
}
But they don't accept arrays of ints?
template Foo(int[]
Do you know why D templates accept floating point values and even
arrays of 32 bit dchars:
template Foo(dchar[] s) {
enum size_t Foo = s.length;
}
void main() {
pragma(msg, Foo!("hello"d.dup));
}
But they don't accept arrays of ints?
template Foo(int[] s) {
enum size_t Foo = s.le
On 06/12/2012 12:55 AM, bearophile wrote:
This is valid Scala code:
object Main {
def main(args: Array[String]): Unit = {
val a: List[BigInt] = List(1, BigInt(2))
}
}
Is it possible/meaningful to support/allow D code like this?
import std.bigint;
void main() {
BigInt[]
This is valid Scala code:
object Main {
def main(args: Array[String]): Unit = {
val a: List[BigInt] = List(1, BigInt(2))
}
}
Is it possible/meaningful to support/allow D code like this?
import std.bigint;
void main() {
BigInt[] a = [1, BigInt(2)];
}
Bye,
bearophile
On 11.06.2012 14:33, Era Scarecrow wrote:
Most curiously while making unittests the asserts fail when I've
confirmed it's working. The difference seems to be if it's
immutable/const vs non, and why this makes a difference I don't see...
Can someone give some light to this?
const float i_f = 3.14
On Monday, 11 June 2012 at 20:28:06 UTC, Era Scarecrow wrote:
On Monday, 11 June 2012 at 12:54:37 UTC, Adam D. Ruppe wrote:
a == b is probably done by the bits at runtime which match
because it is the same assignment.
But a == i_f might be propagated down there as 80 bit compared
to 32 bit and
On Monday, 11 June 2012 at 12:54:37 UTC, Adam D. Ruppe wrote:
a == b is probably done by the bits at runtime which match
because it is the same assignment.
But a == i_f might be propagated down there as 80 bit compared
to 32 bit and thus be just slightly different.
Unfortunately I used FloatR
Andrej Mitrovic:
string[] words = "foo bar doo".split();
into:
string[] res = ["foo bar doo",
"foo doo bar",
"bar foo doo",
"bar doo foo",
"doo foo bar",
"doo bar foo"];
http://rosettacode.org/wiki/Permutations#F
On 6/11/12, Philippe Sigaud wrote:
> Does it still work? It must be almost 2 years old now.
Yup!
On 06/11/2012 03:21 AM, 1100110 wrote:
http://svn.dsource.org/projects/gtkd/branches/070125merge/gtkD/src/gdk/Color.d
uint getValue()
{
return (gdkColor.red <<32) | (gdkColor.green << 16) | (gdkColor.blue);
}
Just browsing through the source it looks like gtkColor.red is a ushort.
I get
On Mon, Jun 11, 2012 at 8:32 PM, Andrej Mitrovic
wrote:
> On 6/11/12, Andrej Mitrovic wrote:
>> I wouldn't know how to translate that to D though.
>
> Found Phillipe's implementation. Cut from dranges.algorithm:
> http://pastebin.com/26s7wNYJ
>
> There's a github clone here: https://github.com/da
On 06/11/2012 10:41 AM, Andrej Mitrovic wrote:
Is there a Phobos function to turn this:
string[] words = "foo bar doo".split();
into:
string[] res = ["foo bar doo",
"foo doo bar",
"bar foo doo",
"bar doo foo",
"doo foo bar",
On 6/11/12, Andrej Mitrovic wrote:
> I wouldn't know how to translate that to D though.
Found Phillipe's implementation. Cut from dranges.algorithm:
http://pastebin.com/26s7wNYJ
There's a github clone here: https://github.com/dawgfoto/dranges
Problem solved for now. :)
On 6/11/12, Andrej Mitrovic wrote:
> So that's not what I'm looking for.
Here's what I'm looking for, but in Python:
http://docs.python.org/library/itertools.html#itertools.combinations
They also have a version that has repeated elements:
http://docs.python.org/library/itertools.html#itertools.c
On 6/11/12, Andrej Mitrovic wrote:
> Also I think the formal word of what I'm looking for is a "powerset".
>
Hmm wrong, not looking a powerset. Here's one anyway which bearophile
posted in another thread:
import std.stdio: writeln;
auto powerSet(T)(T[] items) {
auto r = new T[][](1, 0);
for
On 6/11/12, Andrej Mitrovic wrote:
> On 6/11/12, Andrej Mitrovic wrote:
>> Is there a Phobos function..
>
> Almost forgot, it can't repeat one string multiple times, so no "foo foo
> foo".
>
Also I think the formal word of what I'm looking for is a "powerset".
On Monday, June 11, 2012 19:59:24 Jarl André"
@puremagic.com wrote:
> Hi
>
> I just noticed that by setting a class to private in a module,
> its not inaccessible by other modules including the mentioned
> module. What am I saying syntactically when I am setting a class
> to private in a module?
On 6/11/12, Andrej Mitrovic wrote:
> Is there a Phobos function..
Almost forgot, it can't repeat one string multiple times, so no "foo foo foo".
Is there a Phobos function to turn this:
string[] words = "foo bar doo".split();
into:
string[] res = ["foo bar doo",
"foo doo bar",
"bar foo doo",
"bar doo foo",
"doo foo bar",
"doo bar foo"];
So basically all comb
Am 11.06.2012 18:42, schrieb David:
Am 11.06.2012 16:47, schrieb bearophile:
Adam D. Ruppe:
This function should help:
http://dlang.org/phobos/std_math.html#approxEqual
This is better:
http://dlang.org/phobos/std_math.html#feqrel
Bye,
bearophile
Wasn't there a bug with feqrel?
I think s
Am 11.06.2012 16:47, schrieb bearophile:
Adam D. Ruppe:
This function should help:
http://dlang.org/phobos/std_math.html#approxEqual
This is better:
http://dlang.org/phobos/std_math.html#feqrel
Bye,
bearophile
Wasn't there a bug with feqrel?
I think so, that's the reason why I implemente
Adam D. Ruppe:
This function should help:
http://dlang.org/phobos/std_math.html#approxEqual
This is better:
http://dlang.org/phobos/std_math.html#feqrel
Bye,
bearophile
It probably has to do with different rounding
with the constant and the assignment.
http://dlang.org/float.html
Check out the section: Floating Point Constant Folding
Different compiler settings, optimization
settings, and inlining settings can affect
opportunities for con
I think it has been fixed for the next version of DMD already. Any idea
why align isn't letting me use movdqa?
Cause align doesn't work the way you think it does.
In fact I still don't understand how it works at all.
On Monday, 11 June 2012 at 11:47:59 UTC, Matej Nanut wrote:
On Monday, 11 June 2012 at 10:33:22 UTC, Era Scarecrow wrote:
Most curiously while making unittests the asserts fail when
I've confirmed it's working. The difference seems to be if
it's immutable/const vs non, and why this makes a diff
I think it has been fixed for the next version of DMD already.
Any idea why align isn't letting me use movdqa?
On Monday, 11 June 2012 at 10:33:22 UTC, Era Scarecrow wrote:
Most curiously while making unittests the asserts fail when
I've confirmed it's working. The difference seems to be if it's
immutable/const vs non, and why this makes a difference I don't
see... Can someone give some light to this?
import std.stdio, core.simd;
void main()
{ int4 v;
}
Internal error: ..\ztc\cgcod.c 1447
Building Debug\dtest1.exe failed!
Works fine on Linux.
Maybe the 32Bit check doesn't work for Windoze?
-m32 on Linux yields Error: SIMD vector types not supported on this
platform
import std.stdio, core.simd;
void main()
{ int4 v;
}
Internal error: ..\ztc\cgcod.c 1447
Building Debug\dtest1.exe failed!
test code please
Most curiously while making unittests the asserts fail when I've
confirmed it's working. The difference seems to be if it's
immutable/const vs non, and why this makes a difference I don't
see... Can someone give some light to this?
const float i_f = 3.14159265;
float a = i_f;
float b = i_f;
a
40 matches
Mail list logo