On Monday, 18 October 2021 at 15:58:35 UTC, Don Allen wrote:
On Monday, 18 October 2021 at 15:34:45 UTC, Paul Backus wrote:
On Monday, 18 October 2021 at 15:04:11 UTC, Don Allen wrote:
Section 12.17 of the Language Reference does not indicate any
circumstance in which a dynamic array, which
On Monday, 18 October 2021 at 15:34:45 UTC, Paul Backus wrote:
On Monday, 18 October 2021 at 15:04:11 UTC, Don Allen wrote:
Section 12.17 of the Language Reference does not indicate any
circumstance in which a dynamic array, which the literal is,
is implicitly coerced to a pointer.
This is a
e of you
who know D a lot better than I do can tell me what I've missed or
gotten wrong, if that is the case.
Thanks --
/Don
On Sunday, 7 June 2020 at 00:45:37 UTC, Ali Çehreli wrote:
False. And again, even if so, that's not because of D, but
because of humans. Can you imagine a CTO, say, in Silicon
Valley to have guts to bring D instead of C++? With C++, the
CTO will never be blamed; but D, he or she can easily be b
n a CTFE
>> function, but
>> you can't
>> initialize a module-level or static variable (or enum) with
>> them, and
>> you're
>> attempting to initialize maint_cont with a RedBlackTree,
>> which is a
>> class. It
>> won't work
On Wednesday, 30 January 2013 at 03:38:39 UTC, Chad Joan wrote:
I've read more than once now that 'protected' is considered
useless in D. Why is this?
I've never heard that before. Where have you read that?
Several people, including me, have said that 'package' is useless
-- could that be wha
On Friday, 25 January 2013 at 01:17:44 UTC, Ali Çehreli wrote:
On 01/24/2013 12:42 PM, Matthew Caron wrote:
>> for not null checks
>>
>> if ( ptr !is null) ...
>
> And too much perl has me wanting to write:
>
> if (ptr is not null)
IIRC, the !is operator is thanks to bearophile.
No, it's from
On 13/11/12 06:51, Rob T wrote:
On Monday, 12 November 2012 at 14:28:53 UTC, Andrej Mitrovic wrote:
On 11/12/12, Andrej Mitrovic wrote:
On 11/12/12, Don Clugston wrote:
Yeah. Though note that 1000 bug reports are from bearophile.
Actually only around 300 remain open:
http
On 10/11/12 08:53, Rob T wrote:
On Saturday, 10 November 2012 at 06:09:41 UTC, Nick Sabalausky wrote:
I've gone ahead and filed a minimized test case, and also included your
workaround:
http://d.puremagic.com/issues/show_bug.cgi?id=8990
I didn't make that one struct nested since that's not need
On 01/11/12 22:21, Dan wrote:
TDPL states
--
However, unlike in C++, clear does not dispose of the object’s
own memory and there is no delete operator. (D used to have a
delete operator, but it was deprecated.) You still can free
memory manually if you really, really know what you’re doing by
On 29/10/12 07:19, Ali Çehreli wrote:
On 10/28/2012 02:37 AM, Tobias Pankrath wrote:
> the struct
> SwA from above does neither correspond to SA nor to SB, it's imo more
> like SC:
>
> struct SC {
> immutable(int)* i;
> }
Just to confirm, the above indeed works:
struct SC {
immutabl
On 29/10/12 12:03, Jonathan M Davis wrote:
On Monday, October 29, 2012 11:42:59 Zhenya wrote:
Hi!
Tell me please,in this code first and second static if,are these
equivalent?
with arg = 1, __traits(compiles,"check(arg);") = true,
is(typeof(check(arg))) = false.
In principle, is(typeof(code))
On 24/10/12 17:39, thedeemon wrote:
On Wednesday, 24 October 2012 at 03:50:47 UTC, Dan wrote:
The following takes nearly three minutes to compile.
The culprit is the line bar ~= B();
What is wrong with this?
Thanks,
Dan
struct B {
const size_t SIZE = 1024*64;
int[SIZE] x;
}
On 11/10/12 02:30, Piotr Szturmaj wrote:
Jonathan M Davis wrote:
On Thursday, October 11, 2012 01:24:40 Piotr Szturmaj wrote:
Could you give me an example of preventing closure allocation? I think I
knew one but I don't remember now...
Any time that a delegate parameter is marked as scope, th
On 10/10/12 09:12, thedeemon wrote:
On Wednesday, 10 October 2012 at 07:28:55 UTC, Jonathan M Davis wrote:
Making sure that the aa has been properly initialized before passing
it to a function (which would mean giving it at least one value) would
make the ref completely unnecessary.
- Jonathan
On 05/10/12 16:33, simendsjo wrote:
Are there any known workarounds for forward reference bugs?
I see 80 bugs is filed, but I don't want to read all of them to find any
workarounds. I cannot find anything on the wiki regarding this.
So.. Any good ideas how to get around this?
Those "forward re
On 27/09/12 15:01, bearophile wrote:
Tommi:
2) Is it possible to specialize a function based on whether or not the
parameter that was passed in is a compile time constant?
I am interested in this since some years. I think it's useful, but I
don't know if it can be implemented. I don't remembe
On 20/09/12 18:57, Jonathan M Davis wrote:
On Thursday, September 20, 2012 18:35:21 bearophile wrote:
monarch_dodra:
It's not, it only *operates* on ASCII, but non ascii is still a
legal arg:
Then maybe std.ascii.toLower needs a pre-condition that
constraints it to just ASCII inputs, so it'
On 22/09/12 21:49, Jonathan M Davis wrote:
On Saturday, September 22, 2012 21:19:27 Maxim Fomin wrote:
Privilege instruction is an assembly instruction which can be
executed only at a certain executive process context, typically
os kernel. AFAIK assert(false) was claimed to be implemented by
dmd
On 21/09/12 21:59, Ellery Newcomer wrote:
solution is to use std.traits, but can someone explain this to me?
import std.stdio;
void main() {
auto a = {
writeln("hi");
};
pragma(msg, typeof(a)); // void function()
pragma(msg, is(typeof(a) == delegate)); // nope!
On 10/09/12 02:31, Jonathan M Davis wrote:
On Monday, September 10, 2012 02:16:19 Timon Gehr wrote:
Don has expressed the desire to weed those out completely.
If he can do it in a way that leaves in all of the necessary information, then
great, but you need to be able to know what the
On 05/09/12 21:23, Paul D. Anderson wrote:
On Wednesday, 5 September 2012 at 18:13:40 UTC, Ellery Newcomer wrote:
Hey.
Investigating the possibility of providing this conversion in pyd.
Python provides an api for accessing the underlying bytes.
std.bigint seemingly doesn't. Am I missing anyth
On 05/09/12 03:42, bearophile wrote:
Nicholas Londey:
for example degrees west and kilograms such that they cannot be
accidentally mixed in an expression.
Using the static typing to avoid similar bugs is the smart thing to do :-)
I'd be interested to know if that idea is ever used in real c
On 28/08/12 19:40, Philippe Sigaud wrote:
On Tue, Aug 28, 2012 at 2:07 PM, Chris Cain wrote:
On Tuesday, 28 August 2012 at 11:39:20 UTC, Danny Arends wrote:
Ahhh I understand...
As a follow up, is it then possible to 'track' filling a
large enum / immutable on compile time by outputting a ms
On 29/07/12 23:36, bearophile wrote:
Era Scarecrow:
>>> Another commonly needed operation is a very fast bit count. There
are very refined algorithms to do this.
Likely similar to the hamming weight table mentioned in TDPL.
Combined with the canUseBulk I think I could make it fairly fast.
On 30/07/12 14:32, Jacob Carlborg wrote:
On 2012-07-30 12:30, torhu wrote:
version is good for global options that you set with -version on the
command line. And can also be used internally in a module, but doesn't
work across modules. But it seems you have discovered this the hard way
alread
On 13/07/12 12:52, Johannes Pfau wrote:
Am Fri, 13 Jul 2012 11:53:07 +0200
schrieb Don Clugston :
On 13/07/12 11:16, Johannes Pfau wrote:
Casting from void[] to ubyte[] is currently not allowed in CTFE. Is
there a special reason for this? I don't see how this cast can be
dangerous?
On 13/07/12 11:16, Johannes Pfau wrote:
Casting from void[] to ubyte[] is currently not allowed in CTFE. Is
there a special reason for this? I don't see how this cast can be
dangerous?
CTFE doesn't allow ANY form of reinterpret cast, apart from
signed<->unsigned. In particular, you can't do an
On 12/07/12 11:12, John Colvin wrote:
When I compile the following code with -m32 and -m64 i get a totally
different result, the documentation suggests that they should be the
same...
import core.stdc.stdarg, std.stdio;
void main() {
foo(0,5,4,3);
}
void foo(int dummy, ...) {
va_list
On 25/06/12 14:24, bearophile wrote:
Dmitry Olshansky:
Except for the fact, that someone has to implement it.
I am not seeing one of the posts of this thread. So I'll answer here.
The good thing regarding the run-time overflow integral tests is that
they are already implemented and available
On 14/04/12 16:52, F i L wrote:
On Saturday, 14 April 2012 at 10:38:45 UTC, Silveri wrote:
On Saturday, 14 April 2012 at 07:52:51 UTC, F i L wrote:
On Saturday, 14 April 2012 at 06:43:11 UTC, Manfred Nowak wrote:
F i L wrote:
4) use hardware signalling to overcome some of the limitations
impr
On 23/05/12 11:41, bearophile wrote:
Simen Kjaeraas:
Should this be filed as a bug, or is the plan that only pure functions be
ctfe-able? (or has someone already filed it, perhaps)
It's already in Bugzilla, see issue 7994 and 6169.
It's just happening because the purity checking is currentl
On 20/05/12 00:38, cal wrote:
Is there a way to limit the dmd compiler to outputting just the first
few errors it comes across?
No, but the intention of DMD is to generate only one error per bug in
your code.
If you are seeing a large number of useless errors, please report it in
bugzilla.
h
On 25/04/12 10:34, SomeDude wrote:
Discussion here: http://d.puremagic.com/issues/show_bug.cgi?id=5650
On my Windows box, the following program
import std.stdio, std.container, std.range;
void main() {
enum int range = 100;
enum int n = 1_000_000;
auto t = redBlackTree!int(0);
for (int i = 0
On 24/04/12 15:29, David Bryant wrote:
Because it doesn't make sense. All classes are derived from Object. That
_has_ to be public, otherwise things like == wouldn't work.
Does the same apply for interfaces? I'm specifically implementing an
interface with non-public visibility. This shouldn't
On 24/04/12 14:22, David Bryant wrote:
With the dmd 2.059 I have started getting the error 'use of base class
protection is deprecated' when I try to implement an interface with
private visibility, ie:
interface Interface { }
class Class : private Interface { }
$ dmd test.d
test.d(4): use of b
On 04/04/12 13:46, bearophile wrote:
Do you know why is this program:
import std.stdio;
void main() {
real r = 9223372036854775808UL;
writefln("%1.19f", r);
}
Printing:
9223372036854775807.800
Instead of this?
9223372036854775808.000
Bye,
bearophile
On 04/04/12 18:53, Timon Gehr wrote:
On 04/04/2012 05:15 PM, Don Clugston wrote:
I don't think so. For 80-bit reals, every long can be represented
exactly in an 80 bit real, as can every ulong from 0 up to and including
ulong.max - 1. The only non-representable built-in integer is ulon
On 04/04/12 13:40, bearophile wrote:
Jonathan M Davis:
This progam:
import std.math;
import std.stdio;
import std.typetuple;
ulong log2(ulong n)
{
return n == 1 ? 0
: 1 + log2(n / 2);
}
void print(ulong value)
{
writefln("%s: %s %s", value, log2(value), std.math.
On 19/03/12 15:45, H. S. Teoh wrote:
On Mon, Mar 19, 2012 at 08:50:02AM -0400, bearophile wrote:
James Miller:
writeln(v1 == 1); //false
writeln(v1 == 1.0); //false
writeln(v1 == 1.0f); //false
writeln(v1+1 == 2.0f); //true
Maybe I'd like to deprecate a
On 14/03/12 18:46, Boscop wrote:
On Wednesday, 14 March 2012 at 17:35:06 UTC, Don Clugston wrote:
In the last bit of code, why not use CTFE for valid(string s) instead
of templates?
bool valid(string s)
{
foreach(c; s)
{
if (c < 'w' || c > 'z') return false;
}
retur
On 14/03/12 15:57, Boscop wrote:
Hi everyone,
I wrote a blog post for people who know a bit of D and want to dig
deeper, it shows different approaches to get vector swizzling syntax in D:
http://boscop.tk/blog/?p=1
There is nothing revolutionary involved but it might still be useful to
someone
ot;oogle"));
}
It gives at run-time:
core.exception.RangeError@test(6): Range violation
----
\test.d(6): bool test.strPrefix(const(char[]), const(char[]),
const(int), const(int))
So it seems that Don, when he has implemented the last parts of the
On 21/02/12 12:12, Timon Gehr wrote:
On 02/21/2012 11:27 AM, Daniel Murphy wrote:
scope/scoped isn't broken, they're just not safe. It's better to have an
unsafe library feature than an unsafe language feature.
scope is broken because it is not enforced by the means of
flow-analysis. As a re
On 17/02/12 09:09, Mantis wrote:
17.02.2012 4:30, bearophile пишет:
After seeing this interesting thread:
http://stackoverflow.com/questions/9314534/why-does-changing-0-1f-to-0-slow-down-performance-by-10x
Do you know if there's a simple way to perform _MM_SET_FLUSH_ZERO_MODE
in D?
According
On 16/02/12 17:36, Timon Gehr wrote:
On 02/16/2012 05:06 PM, Don Clugston wrote:
On 16/02/12 13:28, Stewart Gordon wrote:
On 16/02/2012 12:04, Don Clugston wrote:
On 15/02/12 22:24, H. S. Teoh wrote:
What's the original rationale for requiring that hex float literals
must
always ha
On 16/02/12 13:28, Stewart Gordon wrote:
On 16/02/2012 12:04, Don Clugston wrote:
On 15/02/12 22:24, H. S. Teoh wrote:
What's the original rationale for requiring that hex float literals must
always have an exponent? For example, 0xFFi obviously must be float, not
integer, so why doe
On 15/02/12 22:24, H. S. Teoh wrote:
What's the original rationale for requiring that hex float literals must
always have an exponent? For example, 0xFFi obviously must be float, not
integer, so why does the compiler (and the spec) require an exponent?
The syntax comes from C99.
On 10/02/12 16:08, Artur Skawina wrote:
On 02/10/12 15:18, Don Clugston wrote:
On 09/02/12 23:03, Jonathan M Davis wrote:
On Thursday, February 09, 2012 14:45:43 bearophile wrote:
Jonathan M Davis:
Normally, it's considered good practice to give modules names which are
all lowe
On 09/02/12 23:03, Jonathan M Davis wrote:
On Thursday, February 09, 2012 14:45:43 bearophile wrote:
Jonathan M Davis:
Normally, it's considered good practice to give modules names which are
all lowercase (particularly since some OSes aren't case-sensitive for
file operations).
That's just a
On 26/01/12 18:59, xancorreu wrote:
Al 26/01/12 18:43, En/na H. S. Teoh ha escrit:
On Thu, Jan 26, 2012 at 06:06:38PM +0100, xancorreu wrote:
[...]
I note that gdc is completely free software but dmd runtime is not.
You mean free as in freedom, not as in price.
Yes, both
I don't what that
On 15/01/12 20:35, Timon Gehr wrote:
On 01/14/2012 07:13 PM, Vladimir Matveev wrote:
Hi,
Is there a reason why I cannot compile the following code:
module test;
struct Test {
int delegate(int) f;
}
Test s = Test((int x) { return x + 1; });
void main(string[] args) {
return;
}
dmd 2.057 say
On 13/01/12 10:01, k2 wrote:
> When replace typedef to enum, it became impossible to compile a certain
> portion.
>
> dmd v2.057 Windows
>
> enum HANDLE : void* {init = (void*).init}
>
> pure HANDLE int_to_HANDLE(int x)
> {
> return cast(HANDLE)x;
On 03.12.2011 20:14, Dejan Lekic wrote:
I recently stumbled on this thread: http://stackoverflow.com/
questions/5666321/what-is-assignment-via-curly-braces-called-and-can-it-
be-controlled
The important part is this:
8< - begin -
The Standard says in section §8.5.1/1,
On 09.10.2011 13:24, Graham Cole wrote:
I understand from the documentation that the "-release" compiler switch turns off
"array bounds checking for system and trusted functions".
Is it correct that the following code should seg fault when compiled with
"-release" ?
string[string] h;
h["abc"]
I've set up a Windows 7 machine for working on DMD but I can't get
windbg to work properly. Specifically, when I try to debug DMD itself, I
don't get a call stack; I only see the current function.
Everything else seems OK.
Has anyone else experienced this? Any ideas?
Simen Kjaeraas wrote:
On Mon, 22 Aug 2011 22:19:50 +0200, Don wrote:
BTW: The whole "weak pure"/"strong pure" naming was just something I
came up with, to convince Walter to relax the purity rules. I'd rather
those names disappeared, they aren't very helpful.
Timon Gehr wrote:
On 08/21/2011 09:10 PM, Don wrote:
bearophile wrote:
Sean Eskapp:
Oh, I see, thanks! This isn't documented in the function documentation!
D purity implementation looks like a simple thing, but it's not
simple, it has several parts that in the last months have b
bearophile wrote:
Sean Eskapp:
Oh, I see, thanks! This isn't documented in the function documentation!
D purity implementation looks like a simple thing, but it's not simple, it has
several parts that in the last months have be added to the language and
compiler, and we are not done yet, th
Jonathan M Davis wrote:
On Tuesday 09 August 2011 09:32:41 Don wrote:
Jonathan M Davis wrote:
On Monday 08 August 2011 00:33:31 Dmitry Olshansky wrote:
Just lost the best part of an hour figuring the cause of this small
problem, consider:
void main()
{
uint j = 42;
ulong k
Jonathan M Davis wrote:
On Monday 08 August 2011 00:33:31 Dmitry Olshansky wrote:
Just lost the best part of an hour figuring the cause of this small
problem, consider:
void main()
{
uint j = 42;
ulong k = 1<
I would not expect that type of integer being used to give the numb
Nick Sabalausky wrote:
Anyone have a known-working Windows OMF library for MySQL? Static or
dynamic, I don't care. I've tried fucking everything and I can't get the
dang thing to work. Static was a total no-go. With dynamic, using implib I
got it to link, but calling any of it resulted in an Ac
Andrej Mitrovic wrote:
This is just an observation, not a question or anything.
void main()
{
enum width = 100;
double step = 1 / width;
writeln(step); // 0
}
I've just had this bug in my code. I forgot to make either width or 1
a floating-point type. IOW, I didn't do this:
void
Jesse Phillips wrote:
Loopback Wrote:
Hi!
While implementing and overloading several different operators for my
structure I've got stuck with an error.
As noticed in the attachment, in my opBinaryRight function I mimic the
opBinary (left) operator by instantiating the structure itself to avoi
bearophile wrote:
Currently this is not allowed, but do you desire a feature like this?
struct Foo {
int x, y;
int[100] array;
}
void main() {
auto foos = new Foo[100];
foos[].y += 10; // ***
}
Bye,
bearophile
An interesting use case:
void main()
{
cdouble[100] foos;
f
Jonathan M Davis wrote:
On 2011-06-12 02:37, bearophile wrote:
Jonathan M Davis:
Certainly, once range propagation has been fully implemented, this
particular will work without needing any casts, but as soon as the
compiler doesn't know what the values of x and y are, I believe that it
would st
Nick Sabalausky wrote:
"Nick Sabalausky" wrote in message
news:isoltk$1ehd$1...@digitalmars.com...
"Don" wrote in message
news:isoh6c$15jb$1...@digitalmars.com...
Nick Sabalausky wrote:
So my main question: Does DMD do anything like, say, detecting the CPU
at compile ti
f the compiler is very slow
More and more people are contributing patches so development has
definitely become faster.
Also Don has more or less taken over development of the CTFE
functionality. Nice trend.
- Only a small community
=> no real German community
There is no separate German c
Nick Sabalausky wrote:
So my main question: Does DMD do anything like, say, detecting the CPU at
compile time and then enabling instructions only available on that CPU and
up? Or does it do anything like always assuming the target CPU has SSE2?
Anything like that that could cause differences be
Lloyd Dupont wrote:
I tried to add that to my D file
===
public import std.c.windows.windows;
extern(Windows)
{
int GetUserDefaultLocaleName(LPWSTR lpLocaleName, int cchLocaleName);
}
===
Try:
extern(Windows)
{
int GetUserDefaultLocaleNameW(LPWSTR lpLocaleName, int cchLocaleName);
}
and
Dmitry Olshansky wrote:
On 24.05.2011 1:33, Andrej Mitrovic wrote:
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 --
Robert Clipsham wrote:
Hey all,
I was wondering if anyone could enlighten me as to why the following
code does not compile (dmd2, latest release or the beta):
Added as bug 5969.
Mr enuhtac wrote:
Hello everyone,
I'm new to D and this list (although I've had a look onto D a few years ago). I
hope you guys can help me with my questions.
At the moment I'm trying to implement some expression template stuff. My first
goal is to encode an expression into a type representin
Dmitry Olshansky wrote:
On 26.03.2011 11:03, Caligo wrote:
"In the expression a[, ...,], if $ occurs in, it is rewritten as a.opDollar!(i)()." -- TDPL, pg 380
Is that correct? if so, could some one give an example code? I don't
understand the need for the parameter.
Also, what is the signatu
bearophile wrote:
Pedro Rodrigues:
The fact that 'i' and 'j' are deduced to type 'uint' in the second
version. That's the kind of bug that would keep me up at night.
Almost right answer. i and j are size_t, that is not uint in 64 bit
compilations. Unsigned numbers cause the (i-j) sub-express
Andrej Mitrovic wrote:
I have a hunch that this function is only available on Linux. If
that's so it should maybe be put in a version(linux) statement.
But I just found lrint is in std.math as well so I can actually use that.
There should be no reason to use anything from c.math.
Jonathan M Davis wrote:
Greetings All
It has been 2 months since we had release 2.052. Just wondering when is the
2.053 release planned?
There isn't really a release schedule. A release kind of just happens when
Walter decides that it's time or when someone else on the dev team
nrgyzer wrote:
Hey guys,
I got "Assertion failure: '!vthis->csym' on line 703 in file 'glue.c'"
after I add "LinkList!(uint) myList;" to my source file. I figured out
that the same bug was already reported on http://lists.puremagic.com/
pipermail/digitalmars-d-bugs/2010-October/019237.html
Ticke
spir wrote:
On 03/25/2011 12:08 PM, Regan Heath wrote:
On Wed, 23 Mar 2011 21:16:02 -, Jonathan M Davis
wrote:
There are tasks for which you need to be able to lex and parse D
code. To
100% correctly remove unit tests would be one such task.
Is that last bit true? You definitely need to
Jonathan M Davis wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 18:04:57 Don wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Stri
Jonathan M Davis wrote:
On Saturday 19 March 2011 18:04:57 Don wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Jonathan M Davis wrote:
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print out the resulting file.
Motivation: Bug reports frequently come
would like
to do something really useful.
-Don
tsukikage wrote:
Please see source in attachment.
The output is
M2 M3 M5 M7 M13 M17 M19 M31 M61 M89 M107 M127 M521 M607 M1279 M2203
M2281 M3217 M4253 M4423
*** M9689***
M9941 M11213 M19937
*** M21701***
M23209
It missed 2 Mersenne Primes 9689 & 21701.
Is it my program bug or bigint broken?
Jacob Carlborg wrote:
On 2011-01-26 20:30, Jonathan M Davis wrote:
On Wednesday, January 26, 2011 11:21:55 Brad Roberts wrote:
On 1/26/2011 7:13 AM, Steven Schveighoffer wrote:
Anyone have any clue why this file is properly syntax-aware:
https://github.com/D-Programming-Language/druntime/blob
spir wrote:
Hello,
This fails:
class T0 {}
class T1 : T0 {}
class T2 : T0 {}
unittest {
auto t1 = new T1();
auto t2 = new T2();
T0[] ts = [t1, t2];
}
Error: cannot implicitly convert expression (t1) of type __trials__.T0
to __trials__.T2
Error: cannot implicitly convert expressio
%u wrote:
== Quote from Don (nos...@nospam.com)'s article
Yay for first time compiling dmd :)
Sorry you had to do that!
Had to learn that once anyway :)
Maybe I'll even be able to take a stab at fixing bugs someday..
Added your bug as:
http://d.puremagic.com/issues/show_bug.cgi?id=5453
%u wrote:
== Quote from Don (nos...@nospam.com)'s article
It's in a switch statement somewhere.
It sounds as though this is a bug which involves multiple files, so
it'll be difficult to reduce it.
If you're able to compile DMD, change this line in statement.c
%u wrote:
== Quote from Don (nos...@nospam.com)'s article
%u wrote:
Should I post it as a bug, even though I have no code to accompany it?
I have no clue as to where to start my directed search for a minimal case.
Can you post the entire source code?
It's important that it be reprod
%u wrote:
Should I post it as a bug, even though I have no code to accompany it?
I have no clue as to where to start my directed search for a minimal case.
Can you post the entire source code?
It's important that it be reproducible. It doesn't need to be minimal -
someone else can reduce it.
Pete wrote:
Ok, i've done some more investigating and it appears that in DMD2 a float NaN is
0x7FE0 (in dword format) but when it initialises a float 'out' parameter it
initialises it with 0x7FA0H. This causes an FPU trap which is where the time
is going. This looks like a bug to me. Can
bearophile wrote:
spir:
While I understand some may consider this a nice feature, for me this is an
enormous bug. A great way toward code obfuscation. I like D among other reasons
because it's rather clear compared to other languages of the family.
The main problem here is that I have never
Jonathan M Davis wrote:
Maybe I'm just totally missing something, but this seems really wrong to me.
This program:
import std.stdio;
void main()
{
writeln(2.1);
writeln(2.1 == 2.1);
writeln(3 * .7);
writeln(2.1 == 3 * .7);
auto a = 2.1;
auto b = 3 * .7;
writeln(a);
Alex Moroz wrote:
Hi,
As of present Ddoc doesn't seem to process documenatation for code that
is inserted with mixins.
Bug 2440?
spir wrote:
On Fri, 03 Dec 2010 17:49:47 -0500
"Steven Schveighoffer" wrote:
just that i + i generates different instructions than ui + ui where int
i; uint ui;
Not really important, because I'm currently interested in cast only.
Thank you.
That is odd, I would think that i+i generates the
Adam Burton wrote:
olivier wrote:
Hi,
This program, compiled with dmd 1.065 under Linux, crashes:
void main() {
Num a = 1;
}
struct Num {
int[] d;
Num opAssign( int v ) {
d.length = 1;
d[0] = v;
return *this;
}
}
It looks like d is not initialized before opAssign() is called.
It doesn't cr
Kagamin wrote:
Don Wrote:
Why are they templated to begin with? Just for the heck of it?
bool opEquals(ref const BigInt y) const
bool opEquals(long y) const
No, because then it fails for ulong.
It's those bloody C implicit conversions.
hmm... works for me:
---
struct A
{
Kagamin wrote:
Matthias Walter Wrote:
bool opEquals(Tdummy=void)(ref const BigInt y) const
bool opEquals(T: int)(T y) const
The only working sigature for array-of-structs-comparison to work is
bool opEquals(ref const BigInt y) const
But this removes the ability to compare against ints.
Why
Trass3r wrote:
If this isn't in bugzilla, please file a bug report.
http://d.puremagic.com/issues/query.cgi
It probably has the same root cause as bug 4066.
Jonathan M Davis wrote:
Am I correct in my understanding that if you wish a template function which is
imported from another module to compile correctly without requiring other
imports in the module that your using the function in that the module with the
template function needs to publically i
1 - 100 of 286 matches
Mail list logo