On Wed, Aug 5, 2009 at 10:16 PM, Don wrote:
> Lars T. Kyllingstad wrote:
>>
>> Lars T. Kyllingstad wrote:
>>>
>>> Here's a puzzle for you floating-point wizards out there. I have to
>>> translate the following snippet of FORTRAN code to D:
>>>
>>> REAL B,Q,T
>>> C -
Lars T. Kyllingstad wrote:
Lars T. Kyllingstad wrote:
Here's a puzzle for you floating-point wizards out there. I have to
translate the following snippet of FORTRAN code to D:
REAL B,Q,T
C --
C |*** COMPUTE MACHINE BASE ***|
C -
> --
> As to your question:
> class K{
> alias static int B;
> B b; // b is non-static
> }
> --
>
Curious. I didn't actually test the example, but I did for deprecated,
and it doesn
Wed, 5 Aug 2009 20:46:53 + (UTC), teo wrote:
> On Tue, 04 Aug 2009 18:41:50 +0400, Sergey Gromov wrote:
>
>> Sun, 2 Aug 2009 11:18:24 + (UTC), teo wrote:
>>
>>> On Sun, 02 Aug 2009 02:18:28 +0400, Sergey Gromov wrote:
>>>
My guess is that test.di is exactly the same as test.d becau
Tue, 04 Aug 2009 19:57:19 -0400, bearophile wrote:
> D2 is now able to execute math functions (sin, cos, sqrt, etc) at compile
> time.
>
> [snip]
>
> But similar D2 program produces, with DMD v.2.031:
> test.d(12): Error: non-constant expression (V3(1,2,3)).norm()
>
> // D2 code
> import std.m
On Tue, 04 Aug 2009 18:41:50 +0400, Sergey Gromov wrote:
> Sun, 2 Aug 2009 11:18:24 + (UTC), teo wrote:
>
>> On Sun, 02 Aug 2009 02:18:28 +0400, Sergey Gromov wrote:
>>
>>> My guess is that test.di is exactly the same as test.d because all the
>>> functions are small. Therefore compiling 'd
Reply to bearophile,
Jarrett Billingsley:
[...]
--
Lars T. Kyllingstad:
Replying to two different post in the same post significantly reduces the
changes that the second poster will see your reply.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
bearophile wrote:
> D2 is now able to execute math functions (sin, cos, sqrt, etc) at compile
> time.
>
> This little C++ program compiles correctly with G++:
>
> // C++ code
> #include
> #include
>
> struct V3 {
> double x, y, z;
> V3(c
"Lars T. Kyllingstad" wrote:
After the above code has finished, the variable B contains the radix of
the computer's numerical system.
I guess I can just drop this part from my code, then. ;)
Well, there is certain likelihood that decimal floating point will reappear
in the future. However
On Wed, Aug 5, 2009 at 8:07 AM, Lars T.
Kyllingstad wrote:
> Lars T. Kyllingstad wrote:
>>
>> Here's a puzzle for you floating-point wizards out there. I have to
>> translate the following snippet of FORTRAN code to D:
>>
>> REAL B,Q,T
>> C --
>> C |*** COMP
Lars T. Kyllingstad wrote:
Here's a puzzle for you floating-point wizards out there. I have to
translate the following snippet of FORTRAN code to D:
REAL B,Q,T
C --
C |*** COMPUTE MACHINE BASE ***|
C --
T = 1.
10
On Wed, Aug 5, 2009 at 3:45 AM, Oliver Kanai wrote:
> Hello,
> according to my understanding of the "put" method for ranges, which is part
> of the output-range interface, the following should work :
>
> private string[] m_arrHalloStrings = ["Hallo", "Du", "Da", "wie", "?"];
> m_arrHalloStrings.pu
*On Wed, Aug 5, 2009 at 7:23 AM, Ary Borenszweig wrote:
> bearophile escribió:
>>
>> Jarrett Billingsley:
>>>
>>> C++ has static initialization that occurs before main() too. It's just..
>>> hidden.<
>>
>> I see. I have to learn more about C++. Thank you.
>>
>> --
>> Lars T. Kyllin
Lars T. Kyllingstad:
> (I am especially puzzled by the line after l.20. How can this test ever
> be true? Is the fact that the 1 in l.20 is an integer literal significant?)
Generally double.inf+1 == double.inf
Inspecting the run time values inside a direct translation may give you clues.
Bye,
be
I found out that an "appender" or operator ~= will work,
but still do not understand why put makes the program terminate.
Oliver Kanai Wrote:
> Hello,
> according to my understanding of the "put" method for ranges, which is part
> of the output-range interface, the following should work :
>
> p
bearophile escribió:
Jarrett Billingsley:
C++ has static initialization that occurs before main() too. It's just..
hidden.<
I see. I have to learn more about C++. Thank you.
--
Lars T. Kyllingstad:
This is good news! The restrictions you are referring to, are they any of t
Here's a puzzle for you floating-point wizards out there. I have to
translate the following snippet of FORTRAN code to D:
REAL B,Q,T
C --
C |*** COMPUTE MACHINE BASE ***|
C --
T = 1.
10T = T + T
IF ( (1.+T)
Jarrett Billingsley:
>C++ has static initialization that occurs before main() too. It's just..
>hidden.<
I see. I have to learn more about C++. Thank you.
--
Lars T. Kyllingstad:
>This is good news! The restrictions you are referring to, are they any of the
>ones documented he
Don wrote:
Jarrett Billingsley wrote:
I don't think you can call struct methods at compile-time. Kind of
lame, I know. Try making norm a free function.
Can the D2 compiler modified/improved to allow this?
It sure would be nice.
In fact the D1 compiler should support it too.
BTW a few of
Dimitar Kolev wrote:
BCS Wrote:
Hello Dimitar,
Hello I am new to D.
Hello, welcome.
My question is:
How do you apply a .patch file?
this seems to be somewhat usefull:
http://docs.moodle.org/en/Development:How_to_apply_a_patch
windows tools (linux will already have them):
http://gnuwin
Jarrett Billingsley wrote:
I don't think you can call struct methods at compile-time. Kind of
lame, I know. Try making norm a free function.
Can the D2 compiler modified/improved to allow this?
It sure would be nice.
In fact the D1 compiler should support it too.
BTW a few of the restrict
I found out that an "appender" or operator ~= will work,
but still do not understand why put makes the program terminate.
Oliver Kanai Wrote:
> Hello,
> according to my understanding of the "put" method for ranges, which is part
> of the output-range interface, the following should work :
>
> p
Ellery Newcomer Wrote:
> > You mean how the compiler rejects "alias const int x;" but not "alias
> > static int x;"? That is strange..
>
> I want to know why
>
> alias static int x;
>
> is allowed in the first place
d.grammar accepts: alias const int a; but compiler no (it is ok).
d.grammar a
Hello,
according to my understanding of the "put" method for ranges, which is part of
the output-range interface, the following should work :
private string[] m_arrHalloStrings = ["Hallo", "Du", "Da", "wie", "?"];
m_arrHalloStrings.put("Hallo");
it compiles but does not execute:
the compiler giv
24 matches
Mail list logo