Implicit Interface Deduction

2015-12-13 Thread Faux Amis via Digitalmars-d-learn
interface IA {} interface IB {} interface IC {} interface IAB : IA, IB {} interface IBC : IB, IC {} class C : IA, IB, IC {} // Defining C as : IAB, IBC // is not really scalable ;) void main() { IAB c = new C(); // This doesn't work. } // Any suggestions?

Re: Implicit Interface Deduction

2015-12-16 Thread Faux Amis via Digitalmars-d-learn
On Mon 14/12/2015 00:27, Ali Çehreli wrote: On 12/13/2015 02:09 PM, Faux Amis wrote: interface IA {} interface IB {} interface IC {} interface IAB : IA, IB {} interface IBC : IB, IC {} class C : IA, IB, IC {} // Defining C as : IAB, IBC // is not really scalable ;) It is not automatic at

Re: Implicit Interface Deduction

2015-12-16 Thread Faux Amis via Digitalmars-d-learn
On Mon 14/12/2015 02:45, Chris Wright wrote: On Sun, 13 Dec 2015 23:09:47 +0100, Faux Amis wrote: interface IA {} interface IB {} interface IC {} interface IAB : IA, IB {} interface IBC : IB, IC {} class C : IA, IB, IC {} // Defining C as : IAB, IBC // is not really scalable ;) void main() {

Flat file CMS in D?

2017-02-16 Thread Faux Amis via Digitalmars-d-learn
I was wondering, what would be the D equivalent of a flat file (as opposed to database driven) content management system?

Re: Memory Allocation

2017-03-29 Thread Faux Amis via Digitalmars-d-learn
On 2017-03-29 23:30, Faux Amis wrote: On 2017-03-29 21:19, Enigma wrote: I have a memory buffer allocated using different methods. It is simply a pointer and a size. Can you maybe just tread it like an array and slice it for allocation? *treat*

Re: Memory Allocation

2017-03-29 Thread Faux Amis via Digitalmars-d-learn
On 2017-03-29 21:19, Enigma wrote: I have a memory buffer allocated using different methods. It is simply a pointer and a size. Can you maybe just tread it like an array and slice it for allocation?

Re: html fetcher/parser

2017-08-13 Thread Faux Amis via Digitalmars-d-learn
On 2017-08-13 01:49, Soulsbane wrote: On Saturday, 12 August 2017 at 19:53:22 UTC, Faux Amis wrote: I would like to get into D again by making a small program which fetches a website every X-time and keeps track of all changes within specified dom elements. fetching: should I go for std

Re: html fetcher/parser

2017-08-13 Thread Faux Amis via Digitalmars-d-learn
On 2017-08-12 22:22, Adam D. Ruppe wrote: On Saturday, 12 August 2017 at 19:53:22 UTC, Faux Amis wrote: [...] [...] --- // compile: $ dmd thisfile.d ~/arsd/{dom,http2,characterencodings} import std.stdio; import arsd.dom; void main() { auto document =

Re: html fetcher/parser

2017-08-14 Thread Faux Amis via Digitalmars-d-learn
On 2017-08-13 19:51, Adam D. Ruppe wrote: On Sunday, 13 August 2017 at 15:54:45 UTC, Faux Amis wrote: Just curious, but is there a spec of sorts which defines which errors should be fixed and such? The HTML5 spec describes how you are supposed to parse various things, including the recovery

html fetcher/parser

2017-08-12 Thread Faux Amis via Digitalmars-d-learn
I would like to get into D again by making a small program which fetches a website every X-time and keeps track of all changes within specified dom elements. fetching: should I go for std curl, vibe.d or something else? parsing: I could only find these dub packages: htmld & libdominator. And

Re: Porting Java code to D that uses << and >>> operators

2017-05-02 Thread Faux Amis via Digitalmars-d-learn
On 2017-05-02 18:55, TheGag96 wrote: On Tuesday, 2 May 2017 at 07:42:45 UTC, Jacob Carlborg wrote: From that link: "Note that dmd currently does not comply with left to right evaluation of function arguments and AssignExpression". This is something I've never understood. Why doesn't DMD

Re: Porting Java code to D that uses << and >>> operators

2017-05-01 Thread Faux Amis via Digitalmars-d-learn
Not sure if this is still the case. But this [1] suggests that D doesn't have an evaluation order defined but Java does. [1] http://dsource.org/projects/dwt/wiki/Porting#Evaluationorder To me, this [2] suggests otherwise ;) Or am I missing something? [2]

Re: Porting Java code to D that uses << and >>> operators

2017-05-02 Thread Faux Amis via Digitalmars-d-learn
On 2017-05-02 09:42, Jacob Carlborg wrote: On 2017-05-02 01:27, Faux Amis wrote: To me, this [2] suggests otherwise ;) Or am I missing something? [2] https://dlang.org/spec/expression.html#order-of-evaluation From that link: "Note that dmd currently does not comply with left to right

Re: Is there an opposite of .toString()?

2017-10-15 Thread Faux Amis via Digitalmars-d-learn
On 2017-10-14 05:47, Jonathan M Davis wrote: On Saturday, October 14, 2017 00:18:35 myst via Digitalmars-d-learn wrote: I'm sorry if this has been answered already, it seems like a very basic question. There is .toString() method convention for printing, but I can not find anything alike for

float has too much precision

2020-04-21 Thread Faux Amis via Digitalmars-d-learn
I'm dumbfounded, why does the following code write '35' on DMD32 D Compiler v2.091.0-dirty? module magic; float magic( float f ) { return f + 35f - f; } void main() { import std.stdio; writeln( magic(1_000_000_000f) ); }

Re: float has too much precision

2020-04-21 Thread Faux Amis via Digitalmars-d-learn
On 2020-04-21 22:10, Steven Schveighoffer wrote: On 4/21/20 3:47 PM, Faux Amis wrote: I'm dumbfounded, why does the following code write '35' on DMD32 D Compiler v2.091.0-dirty? module magic; float magic( float f ) { return f + 35f - f; } void main() { import std.stdio;