Re: extern(C++) in win32.mak

2018-02-07 Thread Paul D Anderson via Digitalmars-d-learn
On Wednesday, 7 February 2018 at 08:28:23 UTC, Seb wrote: On Wednesday, 7 February 2018 at 06:05:54 UTC, Paul D Anderson wrote: Is there anyone who knows the ins and outs of the makefile that can shed some light? Thanks, Paul I recommend cloning DMD directly from git if you want to compile

Re: extern(C++) in win32.mak

2018-02-07 Thread Paul D Anderson via Digitalmars-d-learn
On Wednesday, 7 February 2018 at 06:18:04 UTC, rikki cattermole wrote: On 07/02/2018 6:05 AM, Paul D Anderson wrote: I don't understand the following line in dmd/src/win32.mak: extern (C++) __gshared const(char)* ddoc_default = import ("default_ddoc_theme.ddoc"); That is a string

extern(C++) in win32.mak

2018-02-06 Thread Paul D Anderson via Digitalmars-d-learn
I don't understand the following line in dmd/src/win32.mak: extern (C++) __gshared const(char)* ddoc_default = import ("default_ddoc_theme.ddoc"); What does the word "import" mean in this context? I can't find any documentation on the use of import in this way, and the line fails to compile

Re: DMD win32.mak error

2017-03-11 Thread Paul D Anderson via Digitalmars-d-learn
On Saturday, 11 March 2017 at 18:02:00 UTC, Stefan Koch wrote: On Saturday, 11 March 2017 at 02:25:15 UTC, Paul D Anderson wrote: On Saturday, 11 March 2017 at 00:34:03 UTC, Paul D Anderson wrote: On Friday, 10 March 2017 at 22:04:23 UTC, Paul D Anderson wrote: [...] I see John Colvin has

Re: DMD win32.mak error

2017-03-10 Thread Paul D Anderson via Digitalmars-d-learn
On Saturday, 11 March 2017 at 00:34:03 UTC, Paul D Anderson wrote: On Friday, 10 March 2017 at 22:04:23 UTC, Paul D Anderson wrote: While building DMD -- "make -fwin32.mak release" -- I received the following error message: echo "2.073.2" > verstr.h Error: don't k

Re: DMD win32.mak error

2017-03-10 Thread Paul D Anderson via Digitalmars-d-learn
On Friday, 10 March 2017 at 22:04:23 UTC, Paul D Anderson wrote: While building DMD -- "make -fwin32.mak release" -- I received the following error message: echo "2.073.2" > verstr.h Error: don't know how to make '../res/default_ddoc_theme/ddoc' --- error level 1

DMD win32.mak error

2017-03-10 Thread Paul D Anderson via Digitalmars-d-learn
While building DMD -- "make -fwin32.mak release" -- I received the following error message: echo "2.073.2" > verstr.h Error: don't know how to make '../res/default_ddoc_theme/ddoc' --- error level 1 I'm guessing it might be a build configuration problem on my end, but what is the problem?

DMD on WIndows 10

2015-07-31 Thread Paul D Anderson via Digitalmars-d
I'm waiting to upgrade from Windows 7 to Windows 10 to avoid the inevitable just-released bugs, but does anyone have any info about D on Windows 10? Has anyone tried it? p.s. Please don't tell me how much better your favorite operating system is than Windows. Thank you. :)

Re: bigint compile time errors

2015-07-07 Thread Paul D Anderson via Digitalmars-d-learn
On Sunday, 5 July 2015 at 20:35:03 UTC, Kai Nacke wrote: On Friday, 3 July 2015 at 04:08:32 UTC, Paul D Anderson wrote: On Friday, 3 July 2015 at 03:57:57 UTC, Anon wrote: On Friday, 3 July 2015 at 02:37:00 UTC, Paul D Anderson wrote: [...] Should be plusTwo(in BigInt n) instead. Yes

Re: bigint compile time errors

2015-07-03 Thread Paul D Anderson via Digitalmars-d-learn
On Friday, 3 July 2015 at 02:37:00 UTC, Paul D Anderson wrote: The following code fails to compile and responds with the given error message. Varying the plusTwo function doesn't work; as long as there is an arithmetic operation the error occurs. [...] https://issues.dlang.org/show_bug.cgi

bigint compile time errors

2015-07-02 Thread Paul D Anderson via Digitalmars-d-learn
The following code fails to compile and responds with the given error message. Varying the plusTwo function doesn't work; as long as there is an arithmetic operation the error occurs. It seems to mean that there is no way to modify a BigInt at compile time. This seriously limits the usability

Re: bigint compile time errors

2015-07-02 Thread Paul D Anderson via Digitalmars-d-learn
On Friday, 3 July 2015 at 03:57:57 UTC, Anon wrote: On Friday, 3 July 2015 at 02:37:00 UTC, Paul D Anderson wrote: enum BigInt test1 = BigInt(123); enum BigInt test2 = plusTwo(test1); public static BigInt plusTwo(in bigint n) Should be plusTwo(in BigInt n) instead. Yes, I had aliased

Re: function default parameters lost

2015-06-26 Thread Paul D Anderson via Digitalmars-d-learn
On Thursday, 25 June 2015 at 14:17:13 UTC, Paul D Anderson wrote: On Thursday, 25 June 2015 at 07:10:57 UTC, tcak wrote: On Thursday, 25 June 2015 at 04:43:51 UTC, Paul D Anderson wrote: I'm trying to pass a function pointer while keeping the default parameter values intact. Given

Re: function default parameters lost

2015-06-25 Thread Paul D Anderson via Digitalmars-d-learn
On Thursday, 25 June 2015 at 07:10:57 UTC, tcak wrote: On Thursday, 25 June 2015 at 04:43:51 UTC, Paul D Anderson wrote: I'm trying to pass a function pointer while keeping the default parameter values intact. Given the following: [...] I filed a bug about 2-3 months ago about default

Re: Compiles but does not link

2015-06-24 Thread Paul D Anderson via Digitalmars-d-learn
On Thursday, 25 June 2015 at 00:24:23 UTC, Paul D Anderson wrote: The code snippet below compiles but the linker fails with Error 42: Symbol undefined. What am I doing wrong? void main() { int foo(int a); alias FP = int delegate(int); FP fp = foo; } Paul Uh, never

Compiles but does not link

2015-06-24 Thread Paul D Anderson via Digitalmars-d-learn
The code snippet below compiles but the linker fails with Error 42: Symbol undefined. What am I doing wrong? void main() { int foo(int a); alias FP = int delegate(int); FP fp = foo; } Paul

function default parameters lost

2015-06-24 Thread Paul D Anderson via Digitalmars-d-learn
I'm trying to pass a function pointer while keeping the default parameter values intact. Given the following: import std.traits; import std.stdio; int foo(int a, int b = 1) { return a; } alias FOOP = int function(int, int = 1); struct ST(POOF) { FOOP fctn; this(POOF fctn) {

Re: mixin template question

2015-04-12 Thread Paul D Anderson via Digitalmars-d-learn
On Sunday, 12 April 2015 at 04:04:43 UTC, lobo wrote: On Sunday, 12 April 2015 at 03:51:03 UTC, Paul D Anderson wrote: I don't understand why the following code compiles and runs without an error: import std.stdio; mixin template ABC(){ int abc() { return 3; } } mixin ABC; int abc

Re: Function name from function pointer

2015-04-11 Thread Paul D Anderson via Digitalmars-d-learn
On Saturday, 11 April 2015 at 19:08:50 UTC, Marco Leise wrote: Am Sat, 11 Apr 2015 18:28:35 + schrieb Paul D Anderson claude.re...@msnmail.com: Is there a way to return the name of a function (a string) from a pointer to that function? Function pointer example from D Reference: --- int

Function name from function pointer

2015-04-11 Thread Paul D Anderson via Digitalmars-d-learn
Is there a way to return the name of a function (a string) from a pointer to that function? Function pointer example from D Reference: --- int function() fp; void test() { static int a = 7; static int foo() { return a + 3; } fp = foo; } void bar() { test(); int i = fp();

mixin template question

2015-04-11 Thread Paul D Anderson via Digitalmars-d-learn
I don't understand why the following code compiles and runs without an error: import std.stdio; mixin template ABC(){ int abc() { return 3; } } mixin ABC; int abc() { return 4; } void main() { writefln(abc() = %s, abc()); } Doesn't the mixin ABC create a function with the same

Re: Template Parameter Deduction

2015-03-12 Thread Paul D Anderson via Digitalmars-d-learn
On Wednesday, 11 March 2015 at 23:04:15 UTC, Ali Çehreli wrote: On 03/11/2015 03:44 PM, Paul D Anderson wrote: This used to work in D2.065: given 1) public T mul(T)(in T x, in T y, Context context = T.context) if (isDecimal!T) // one template parameter for the two input values and 2

Re: Template Parameter Deduction

2015-03-11 Thread Paul D Anderson via Digitalmars-d-learn
On Wednesday, 11 March 2015 at 22:44:12 UTC, Paul D Anderson wrote: This used to work in D2.065: given 1) public T mul(T)(in T x, in T y, Context context = T.context) if (isDecimal!T) // one template parameter for the two input values and 2) public T mul(T, U)(in T x, U n, Context

Template Parameter Deduction

2015-03-11 Thread Paul D Anderson via Digitalmars-d-learn
This used to work in D2.065: given 1) public T mul(T)(in T x, in T y, Context context = T.context) if (isDecimal!T) // one template parameter for the two input values and 2) public T mul(T, U)(in T x, U n, Context context = T.context) if (isDecimal!T isIntegral!U) // two

Re: D 2.066 new behavior

2014-08-22 Thread Paul D Anderson via Digitalmars-d-announce
On Friday, 22 August 2014 at 02:26:38 UTC, safety0ff wrote: On Friday, 22 August 2014 at 01:54:55 UTC, Paul D Anderson wrote: Is this expected behavior that has never been enforced before, or is it something new? And is anyone else having the same problem? Paul Looks like a regression

D 2.066 new behavior

2014-08-21 Thread Paul D Anderson via Digitalmars-d-announce
In all previous versions through 2.066 beta 5, the following code compiled and ran correctly: import std.stdio; T add(T)(in T x, in T y) { T z; z = x + y; return z; } void main() { const double a = 1.0; const double b = 2.0; double c; c

Re: new error message in 2.066, type bool (const)

2014-08-21 Thread Paul D Anderson via Digitalmars-d-learn
On Wednesday, 20 August 2014 at 20:46:20 UTC, Paul D Anderson wrote: Re-compiling existing code with version 2.066 generates a lot of errors complaining about implicit conversion to const. Typical is this call (inside a struct with properties 1 2): z.sign = x.sign ^ y.sign; Error

Re: new error message in 2.066, type bool (const)

2014-08-21 Thread Paul D Anderson via Digitalmars-d-learn
On Friday, 22 August 2014 at 01:25:05 UTC, Paul D Anderson wrote: On Wednesday, 20 August 2014 at 20:46:20 UTC, Paul D Anderson I don't know if this is expected behavior that just wasn't enforced before, or if this is something new. Either way I don't like it. And I'm a little surprised I'm

new error message in 2.066, type bool (const)

2014-08-20 Thread Paul D Anderson via Digitalmars-d-learn
Re-compiling existing code with version 2.066 generates a lot of errors complaining about implicit conversion to const. Typical is this call (inside a struct with properties 1 2): z.sign = x.sign ^ y.sign; Error: None of the overloads of 'sign' are callable using argument types bool

Re: new error message in 2.066, type bool (const)

2014-08-20 Thread Paul D Anderson via Digitalmars-d-learn
What changed? It ran okay with early beta versions, but not with the release. Paul It compiles in beta-5 but not beta-6. Is the list of changes in the beta testing wiki complete? None seem pertinent. monarch_dodra: Thanks for checking. I was trying to avoid tearing everything down. I

Templates and function parametes

2014-08-09 Thread Paul D Anderson via Digitalmars-d-learn
When I try to compile these two functions, the second function is flagged with an already defined error: bool testRoundTrip(T, U)(T first, U second) if (isIntegral!T isFloatingPoint!U) { return false; } bool testRoundTrip(U, T)(U first, T second) if (isIntegral!T isFloatingPoint!U) {

Re: Templates and function parametes

2014-08-09 Thread Paul D Anderson via Digitalmars-d-learn
On Saturday, 9 August 2014 at 07:07:42 UTC, Rikki Cattermole wrote: Cannot reproduce on either 2.065 or git head (according to dpaste). You are right. I had the functions in a unittest block that got executed more than once so the second execution was a redefinition. Thanks for taking

Repeated import qualifiers accepted

2014-07-22 Thread Paul D Anderson via Digitalmars-d
Doubled (or tripled, etc.) import qualifiers are accepted in some cases. auto m = std.math.std.math.std.math.abs(-32.33); // no error std.stdio.std.stdio.writeln(123); // no error auto fmt = std.array.std.array.appender!(string)(); // no error auto ms =

Re: Decimal Numbers

2014-07-08 Thread Paul D Anderson via Digitalmars-d-announce
On Tuesday, 8 July 2014 at 08:15:28 UTC, Sönke Ludwig wrote: Am 07.07.2014 23:15, schrieb Paul D Anderson: On Monday, 7 July 2014 at 03:26:54 UTC, Poyeyo wrote: Can you add a dub.json and submit it to the dub registry? etcimon generated a dub.json file which I've merged into github. Thanks

Re: Decimal Numbers

2014-07-07 Thread Paul D Anderson via Digitalmars-d-announce
On Monday, 7 July 2014 at 03:26:54 UTC, Poyeyo wrote: Can you add a dub.json and submit it to the dub registry? etcimon generated a dub.json file which I've merged into github. Thanks. However, I am unable to register the package because it requires a version number, which I don't know how

Re: Decimal Numbers

2014-07-06 Thread Paul D Anderson via Digitalmars-d-announce
On Monday, 7 July 2014 at 03:26:54 UTC, Poyeyo wrote: Can you add a dub.json and submit it to the dub registry? I can do that but I want to get the 32-, 64- and 128-bit structs in place first. Probably by midweek (July 9).

redundant storage class 'const

2014-07-05 Thread Paul D Anderson via Digitalmars-d
The getValueX functions below differ only in the number and placing of the keyword 'const'. The compiler rejects the first (with 'const const' prefix), as expected (Error: redundant storage class 'const'). The second (with prefix 'const', suffix 'const') is accepted. It looks strange but is

Re: Decimal Numbers

2014-07-04 Thread Paul D Anderson via Digitalmars-d-announce
On Friday, 4 July 2014 at 06:43:15 UTC, Iain Buclaw via Digitalmars-d-announce wrote: 6) Rename the file decimal.d to package.d, and module eris.decimal.decimal to eris.decimal Thanks, will do. Paul

Re: Decimal Numbers

2014-07-03 Thread Paul D Anderson via Digitalmars-d-announce
Sorry for the unusual formatting. Paul

Decimal Numbers

2014-07-03 Thread Paul D Anderson via Digitalmars-d-announce
A candidate implementation of decimal numbers (arbitrary-precision floating-point numbers) is available for review at https://github.com/andersonpd/eris/tree/master/eris/decimal. This is a substantial rework of an earlier implementation which was located at

Re: core.checkedint added to druntime

2014-07-01 Thread Paul D Anderson via Digitalmars-d-announce
Will this be in the 2.066 Beta? On Wednesday, 18 June 2014 at 01:26:16 UTC, Walter Bright wrote: https://github.com/D-Programming-Language/druntime/pull/839 While being a very modest piece of code in and of itself, I believe this offers a significant opportunity that both D compilers and

Re: template mixins for boilerplate

2014-06-21 Thread Paul D Anderson via Digitalmars-d-learn
On Saturday, 21 June 2014 at 11:12:18 UTC, Artur Skawina via Digitalmars-d-learn wrote: On 06/21/14 05:32, Paul D Anderson via Digitalmars-d-learn wrote: I can't use a template mixin: mixin template Function(string name) { const char[] Function = public static int ~ name ~ () { return

template mixins for boilerplate

2014-06-20 Thread Paul D Anderson via Digitalmars-d-learn
I am misunderstanding something about using mixins for boilerplate code. I've got a set of functions all of which do the same thing: public static int fctn1() { return other.place.fctn1; } I can't use a string mixin to generate the code: template Function(string name) { const char[]

enum functions

2014-06-20 Thread Paul D Anderson via Digitalmars-d-learn
Does enum have any effect on functions? Is this: mixin (Constant!(ln2)); package enum T ln2(T)(Context context) { return log(T.TWO, context, false); } different from this: mixin (Constant!(ln2)); package /*enum*/ T ln2(T)(Context context) { return log(T.TWO, context, false); }

Casting Structs

2014-06-01 Thread Paul D Anderson via Digitalmars-d
This has been discussed on the learning forum but I wanted to bring this to a wider audience. Apparently structs can be cast to other structs as long as they're the same size. In my case I have a decimal struct which is parameterized with the precision, max exponent, rounding mode, etc.:

Casting Structs

2014-05-31 Thread Paul D Anderson via Digitalmars-d-learn
I'm working on the decimal number package for D. A decimal is a struct with precision, max exponent and rounding mode parameters: Decimal!(PRECISION, MAX_EXPO, ROUNDING). I was trying to overload the opCast operator for this struct and I found that it does not seem necessary. I can cast

Re: enums

2014-05-31 Thread Paul D Anderson via Digitalmars-d-learn
On Saturday, 31 May 2014 at 20:14:59 UTC, bearophile wrote: Miles Stoudenmire: In contrast to those two examples where immutable can be used at compile time, what are some other cases where it is necessary to use enum instead of immutable? By default use enum if you define a

Re: Casting Structs

2014-05-31 Thread Paul D Anderson via Digitalmars-d-learn
On Saturday, 31 May 2014 at 22:34:45 UTC, Timon Gehr wrote: On 06/01/2014 12:25 AM, Ali Çehreli wrote: dec10 little = cast(dec10(bingo)); You meant cast(dec10)(bingo). assert(little == dec10(123.45)); Is this expected behavior? Paul That is surprising. I've discovered that if the

Re: Phobos Review Queue

2013-06-07 Thread Paul D. Anderson
On Thursday, 6 June 2013 at 19:50:51 UTC, Brian Schott wrote: std.uni was recently accepted for inclusion in Phobos, and as far as I'm aware there are no reviews currently in progress. We currently have a backlog of several modules that are ready for comments or review[1]. There seems to be

bigint implicit cast to bool breaks code

2013-05-30 Thread Paul D. Anderson
Issue 4120 added an implicit cast for BigInt to a boolean value. This used to work: /// Returns a mutable copy of a BigInt public BigInt mutable(const BigInt num) { BigInt big = cast(BigInt)num; return big; } But it now generates an error: Error: template instance

Re: bigint implicit cast to bool breaks code

2013-05-30 Thread Paul D. Anderson
On Thursday, 30 May 2013 at 22:57:20 UTC, bearophile wrote: Paul D. Anderson: Is there another way to make a mutable copy of a BigInt? For now don't make bigints constant. const=mutable cast is not a good idea in general, in D. Bye, bearophile It's like the old joke: Doc, it hurts when

Re: bigint implicit cast to bool breaks code

2013-05-30 Thread Paul D. Anderson
On Thursday, 30 May 2013 at 22:32:08 UTC, Paul D. Anderson wrote: Issue 4120 added an implicit cast for BigInt to a boolean value. This used to work: /// Returns a mutable copy of a BigInt public BigInt mutable(const BigInt num) { BigInt big = cast(BigInt)num; return big

Silent compile error

2013-05-08 Thread Paul D. Anderson
Changed compilers from dmd 2.060 to dmd 2.062, running on Windows 7. Got a couple of errors relating to imports that I fixed but now it crashes with no indication of what went wrong. A Windows message dialog pops up stating that dmd.exe has stopped working. The details are posted below. The

Additional Binary Operators

2013-03-01 Thread Paul D. Anderson
Operator overloading in D is straightforward and sensible. I think there is an opportunity for D to do better with some very small changes. I propose including additional Unicode mathematical symbols as recognized operators for opBinary. All that would be required is to extend the lexer to

Re: Additional Binary Operators

2013-03-01 Thread Paul D. Anderson
On Friday, 1 March 2013 at 22:09:15 UTC, Ali Çehreli wrote: On 03/01/2013 01:51 PM, Paul D. Anderson wrote: In UTF-8 the middle dot, ('•', \u00B7) and multiplication sign, ('×', \u00D7) [...] UTF-16 has many more mathematical symbols Sorry to pick on this unrelated issue but UTF-8 and UTF

Re: Additional Binary Operators

2013-03-01 Thread Paul D. Anderson
On Friday, 1 March 2013 at 22:56:27 UTC, Era Scarecrow wrote: Those operators seem more useful for scientific math. I wouldn't want them added to to the core language though. I agree that they are not going to be used by most programmers. This is true for a lot of Phobos, which is

Re: Additional Binary Operators

2013-03-01 Thread Paul D. Anderson
On Saturday, 2 March 2013 at 00:31:20 UTC, Era Scarecrow wrote: On Friday, 1 March 2013 at 23:29:43 UTC, Paul D. Anderson wrote: My bottom line is the need to define at least one more product operator. I only propose adding it to the core language because I can't find a way to make it happen

Re: Expanding Phobos from a flat hierachy

2013-02-07 Thread Paul D. Anderson
On Wednesday, 6 February 2013 at 07:56:26 UTC, Don wrote: In the Implementing Half Floats in D thread, we seemed to have reached a consensus on two important points: (a) Phobos should have a broad scope (rather than being small like the C standard library). (b) The current flat structure of

DConf13: Venue and Cost

2013-02-01 Thread Paul D. Anderson
The DConf13 website is mostly coming soon. That makes sense for the schedule, speakers, talks, etc., but I'd like to make travel plans. Venue? Which hotel? Cost of Registration? Thanks, Paul

Re: Implementing Half Floats in D

2013-02-01 Thread Paul D. Anderson
I agree that we need a distinct package for numerics, both numbers and algorithms. I proposed a birds-of-a-feather discussion on this topic for DConf2013, but haven't heard back yet. If not officially, we can still discuss this there, perhaps? Paul D. Anderson

Re: Implementing Half Floats in D

2013-02-01 Thread Paul D. Anderson
On Thursday, 31 January 2013 at 17:05:50 UTC, Andrei Alexandrescu wrote: On 1/31/13 10:38 AM, Don wrote: The basic problem is that there are hundreds of potential numeric algorithms and data structures of equal importance to these ones. In fact, the total number of mathematical algorithms is

Re: Implementing Half Floats in D

2013-02-01 Thread Paul D. Anderson
On Friday, 1 February 2013 at 20:04:47 UTC, Jacob Carlborg wrote: Isn't this what the whole community is about and what we're already doing. Just not very formal or official. You're right, but what I was looking for was something that actually was more formal. I think the only thing that's

Status of Decimal Floating Point Module

2012-10-30 Thread Paul D. Anderson
There have been a couple of mentions of the decimal module lately so I thought I'd bring everyone up to speed. The short version is that it's probably at an alpha stage of development. If anyone wants to download it and try it out I'd appreciate the feedback. See below. The software is an

Re: Preliminary submission - std.rational and std.typelist

2012-10-09 Thread Paul D. Anderson
On Monday, 8 October 2012 at 15:14:35 UTC, Aziz K. wrote: Incidentally, I would very much need a BigFloat class/struct, written in D and independent of any C library. I'm trying to write one myself, but it seems to be rather tricky. Could this be implemented in a short amount of time by

Re: bigint - python long

2012-09-05 Thread Paul D. Anderson
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 anything? No, I don't believe so. AFAIK

Re: How to have strongly typed numerical values?

2012-09-05 Thread Paul D. Anderson
On Wednesday, 5 September 2012 at 11:50:12 UTC, bearophile wrote: Don Clugston: I'd be interested to know if that idea is ever used in real code. I mean, it's a classic trendy template toy, but does anyone actually use it? As usual I don't have usage statistics. I like dynamic languages,

Re: bigint - python long

2012-09-05 Thread Paul D. Anderson
On Wednesday, 5 September 2012 at 19:23:11 UTC, Paul D. Anderson wrote: No, I don't believe so. AFAIK there is no public access to the underlying array, but I think it is a good idea. I meant to say I think that access to the array is a good idea, not the lack of access. Words are hard!

Re: dmd 1.075 and 2.060 release

2012-08-02 Thread Paul D. Anderson
On Thursday, 2 August 2012 at 19:19:04 UTC, Walter Bright wrote: Another big pile of bug fixes. More contributors than ever! http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.075.zip http://www.digitalmars.com/d/2.0/changelog.html

FYI: Ceylon

2012-07-13 Thread Paul D. Anderson
I took a quick look at the Ceylon language (http://ceylon-lang.org/) which is supposed to be a follow on to Java (they disavow the name Java Killer wink, wink, nudge, nudge). One of their design goals is familiar, readable syntax, but they seemed to have missed the boat on that one. Their

Re: Raw binary(to work without OS) in D

2012-06-29 Thread Paul D. Anderson
On Thursday, 28 June 2012 at 16:50:59 UTC, David Nadlinger wrote: On Thursday, 28 June 2012 at 14:35:24 UTC, Andrei Alexandrescu wrote: On 6/28/12 10:07 AM, Roman D. Boiko wrote: On Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote: I think just exposing them via .sig and .exp might be the

Re: Raw binary(to work without OS) in D

2012-06-29 Thread Paul D. Anderson
On Thursday, 28 June 2012 at 16:50:59 UTC, David Nadlinger wrote: On Thursday, 28 June 2012 at 14:35:24 UTC, Andrei Alexandrescu wrote: On 6/28/12 10:07 AM, Roman D. Boiko wrote: On Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote: I think just exposing them via .sig and .exp might be the

Re: Rational numbers in D

2012-06-10 Thread Paul D. Anderson
On Sunday, 10 June 2012 at 14:34:17 UTC, Joseph Rushton Wakeling wrote: On 10/06/12 13:17, Joseph Rushton Wakeling wrote: I saw that Bearophile has contributed some code for this: http://d.puremagic.com/issues/show_bug.cgi?id=7102#c3 Ooops, not code, just a spec. If people are interested

Re: Rational numbers in D

2012-06-10 Thread Paul D. Anderson
It seems like we ought to have rational numbers in Phobos along with other number types. Something like this: std.number.rational; std.number.decimal; std.number.integer; (fixed-size signed and unsigned integers, safe integers that throw on overflow or rollover, like Andrei's CheckedInt

Re: Rational numbers in D

2012-06-08 Thread Paul D. Anderson
On Thursday, 7 June 2012 at 17:49:22 UTC, Joseph Rushton Wakeling wrote: Sorry for the double-post -- I already asked this in d-learn, but this may be a better place to ask. What's the current state of affairs and roadmap for inclusion of rational number support in D? I've come across David

Re: Implicit type conversions with data loss

2012-06-05 Thread Paul D. Anderson
On Tuesday, 5 June 2012 at 18:06:15 UTC, ctrl wrote: I don't want them to be performed at all. How do I disable this 'feature'? For example, take a look at this code: import std.stdio; void main() { int x = -1; uint b = x; writeln(b); } It outputs 4294967295, but I

Re: AST Macros?

2012-06-05 Thread Paul D. Anderson
On Tuesday, 5 June 2012 at 21:20:43 UTC, Jacob Carlborg wrote: On 2012-06-05 11:02, foobar wrote: This argument was raised before. That heap of problems is as vague as the proposed AST system(s). As far as I can tell, that heap of problems is mainly about making it harder to make internal

Re: D Conference 2012 - Sep 26-29 at the Banker's Suite and Ballroom in Astoria, Oregon

2012-05-27 Thread Paul D. Anderson
Summary of previous discussion: Q. Is there more information on the Astoria seminar? A. Yes: http://astoriaseminar.com/index.html So which is less helpful? The answer to a question asked in the previous post which requires the reader to actually read down ten lines, or a long digression

Re: D Conference 2012 - Sep 26-29 at the Banker's Suite and Ballroom in Astoria, Oregon

2012-05-24 Thread Paul D. Anderson
Here it is! http://astoriaseminar.com/index.html On Thursday, 17 May 2012 at 21:38:32 UTC, Paul D. Anderson wrote: On Wednesday, 22 February 2012 at 22:07:26 UTC, Walter Bright wrote: Pricing isn't set yet, nor has a web site been set up yet, this is just a heads up to reserve the dates

Re: Integer overflow and underflow semantics

2012-05-18 Thread Paul D. Anderson
On Friday, 18 May 2012 at 19:59:01 UTC, Paul D. Anderson wrote: On Sunday, 6 May 2012 at 16:27:34 UTC, Alex Rønne Petersen wrote: On 05-05-2012 06:57, Alex Rønne Petersen wrote: Hi, I don't think the language really makes it clear whether overflows and underflows are well-defined. Do we

Re: Integer overflow and underflow semantics

2012-05-18 Thread Paul D. Anderson
On Sunday, 6 May 2012 at 16:27:34 UTC, Alex Rønne Petersen wrote: On 05-05-2012 06:57, Alex Rønne Petersen wrote: Hi, I don't think the language really makes it clear whether overflows and underflows are well-defined. Do we guarantee that for any integral type T, T.max + 1 == T.min and

Re: [OT] Windows users: Are you happy with git?

2012-05-18 Thread Paul D. Anderson
On Friday, 18 May 2012 at 07:58:26 UTC, Lars T. Kyllingstad wrote: I remember back when we were considering whether to move DMD, Phobos and druntime from SVN on DSource to Git on GitHub, there were some concerns about using Git on Windows. People claimed that Git was a very Linux-centric

Re: D Conference 2012 - Sep 26-29 at the Banker's Suite and Ballroom in Astoria, Oregon

2012-05-17 Thread Paul D. Anderson
On Wednesday, 22 February 2012 at 22:07:26 UTC, Walter Bright wrote: Pricing isn't set yet, nor has a web site been set up yet, this is just a heads up to reserve the dates on your calendar, and start thinking about that presentation you want to do! The general idea is: Wed evening - meet

Re: Alias Expressions

2012-04-23 Thread Paul D. Anderson
On Monday, 23 April 2012 at 14:53:38 UTC, Eldar Insafutdinov wrote: Which brings us to an interesting point that alias and enum should be brought together: alias x = 1; alias y = int; should replace current enum x = 1; alias int y; respectively. This is makes it a consistent

Re: Alias Expressions

2012-04-23 Thread Paul D. Anderson
A couple of examples of earlier discussions: http://www.digitalmars.com/d/archives/digitalmars/D/Non-enum_manifest_constants_Pie_in_the_sky_102248.html http://www.digitalmars.com/d/archives/digitalmars/D/Manifest_constants_why_enum_instead_of_invariant_70595.html

UFCS Documentation

2012-04-19 Thread Paul D. Anderson
We should add a short section to the language reference/function page to cover UFCS syntax, usage, do's and dont's, etc. Paul

Newbie Introduction (was Re: arrays and foreach)

2012-04-18 Thread Paul D. Anderson
SomeDude: Your outline and especially your emphasis on what a rank beginner needs to know is very good. Would you consider writing it up yourself? Not the whole thing, maybe but the beginner info and the compiler/linker appendices. You have a commendable prose style. There are tutorials

Re: FormatSpec struct

2012-04-13 Thread Paul D. Anderson
On Friday, 13 April 2012 at 09:10:37 UTC, James Miller wrote: snip/ So I made the pull request, the documentation you need to read is here: https://github.com/Aatch/phobos/commit/cda3c079ee32d98a017f88949c10097840baa075 Hopefully it helps. -- James Miller Thanks. That did the trick. Paul

FormatSpec struct

2012-04-12 Thread Paul D. Anderson
I'm trying to add formatted output to my decimal arithmetic module. Decimals should format like floating point, using 'E', 'F' and 'G', etc. I would expect a format string like %9.6e to parse as width = 9, precision = 6, using exponential notation. In std.format there is a FormatSpec struct

BlockingTextWriter?

2012-03-17 Thread Paul D. Anderson
In the Phobos documentation for std.format: [O]utput is sent do this writer. Typical output writers include std.array.Appender!string and std.stdio.BlockingTextWriter. std.stdio doesn't have a BlockingTextWriter but it does have a LockingTextWriter. Typo? Name change? BlockingTextWriter is

Re: Wanted: 128 bit integers

2012-03-15 Thread Paul D. Anderson
On Thursday, 15 March 2012 at 15:39:47 UTC, Daniel Murphy wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:jjt1lh$pfb$1...@digitalmars.com... My suggestion is to focus on fixed arbitrary-sized integers in Phobos, and then add optimizations for 64-bit integers on

Wanted: 128 bit integers

2012-03-13 Thread Paul D. Anderson
I'm working on a decimal arithmetic project and I need 128 bit integers in order to implement the decimal128 type. (The decimal value is stored in 128 bits; the coefficient field is 114 bits, to hold values with 34 decimal digits.) I could use BigInt (but that's overkill) or I could code them

Re: Dscience

2012-03-12 Thread Paul D. Anderson
On Friday, 2 March 2012 at 12:27:06 UTC, bioinfornatics wrote: Dear, I have do a D 2 port to my dscience project: https://gitorious.org/dscience/dscience Any help are welcome I'm willing to help but I've got a couple of other things I need to get out the door first. But I will take a look

Re: D Conference 2012 - Sep 26-29 at the Banker's Suite and Ballroom in Astoria, Oregon

2012-02-23 Thread Paul D. Anderson
On Thursday, 23 February 2012 at 19:54:00 UTC, Walter Bright wrote: On 2/23/2012 5:33 AM, James Miller wrote: Question: Can I save enough money by September to pay for return flights from NZ and accomodation for a week? Answer: Probably not, but I can try! On the plus side, Astoria isn't an

Re: Why is there no or or and ?

2012-02-17 Thread Paul D. Anderson
On Friday, 17 February 2012 at 20:52:56 UTC, F i L wrote: H. S. Teoh wrote: Are you referring to: int x = 10; vs. x = 10; ? In that case I would still prefer :=, since the first can be thought of as shorthand for int x; x := 10. I'm not sure what you're asking/saying

Re: Object.opEquals, opCmp, toHash

2012-02-16 Thread Paul D. Anderson
On Thursday, 16 February 2012 at 08:35:20 UTC, Walter Bright wrote: These all need to be: const pure nothrow @safe Unless this is done, the utility of const, pure, nothrow and @safe is rather crippled. Any reason why they shouldn't be? One reason is memoization, aka lazy initialization,

Re: Incubated modules for Phobos

2012-01-04 Thread Paul D. Anderson
I think this idea needs further consideration. Summarizing the earlier discussion, there were four schools of thought: 1. This is a good idea. 2. This is a good idea, but let's use github branches. 3. This is a good idea, but let's use newsgroup postings. 4. This is a good idea, but let's use

Re: BigInt bool assign

2011-12-23 Thread Paul D. Anderson
FWIW, I've just added logical operations to my decimal number library (https://github.com/andersonpd/decimal) and boolean interoperability arose as a byproduct. From std.bigint docs: All arithmetic operations are supported, except unsigned shift right (). Logical operations are not currently

Unsubscribing from D.Announce

2011-12-20 Thread Paul D. Anderson
Sorry if this question has an obvious answer, but how do I unsubscribe from D.Announce? I subscribed because I was missing compiler updates, etc., but I didn't realize how busy the forum was. I get 10 or 20 messages every time I check my e-mail (less than once a day) and that's about 9 or 19

Re: Unsubscribing from D.Announce

2011-12-20 Thread Paul D. Anderson
On Tuesday, 20 December 2011 at 18:35:52 UTC, Andrej Mitrovic wrote: http://lists.puremagic.com/cgi-bin/mailman/listinfo/digitalmars-d-announce Last input box (unsuscribe or edit options button). Thx

Re: initializedArray

2011-12-20 Thread Paul D. Anderson
I think this is a great idea and a good example of adding to the library rather than changing the syntax. Paul Wouldn't the sentence 'I want to put a hyphen between the words Fish and And and And and Chips in my Fish-And-Chips sign' have been clearer if quotation marks had been placed before

  1   2   3   >