Re: Question on Immutability

2021-08-30 Thread ag0aep6g via Digitalmars-d-learn
On 31.08.21 02:50, Mike Parker wrote: Member functions marked as immutable can be called on both mutable and immutable instances. That's not true.

Re: vibe.d: is it possible to use bare HTML with the functionalty of DIET templates ?

2021-08-30 Thread Adam D Ruppe via Digitalmars-d-learn
On Tuesday, 31 August 2021 at 00:09:14 UTC, someone wrote: Can I use vibe.d *without* DIET templates manually writing say, XHTML 1.1 pages, *while having D* at my disposal with the - prefixes I have seen so far ? I don't know much about vibe.d (I have my own D web stuff) but just for fun I

Re: Question on Immutability

2021-08-30 Thread Mike Parker via Digitalmars-d-learn
On Monday, 30 August 2021 at 23:27:07 UTC, Merlin Diavova wrote: ``` After playing around the above works, Great! However I have some questions First, why do the interfaces have to be defined as `immutable interface`? The interfaces cannot be changed at runtime or instantiated. It isn't

Re: Question on Immutability

2021-08-30 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Aug 30, 2021 at 11:27:07PM +, Merlin Diavova via Digitalmars-d-learn wrote: > Hi All, > > I'm trying to understand immutability in D and it seems a bit odd. > I'm coming from dynamic languages so please forgive my ignorance and > dynamic language-isms. > > I want to have a base

Re: Labelled @nogc Working With Inner Scopes

2021-08-30 Thread Mike Parker via Digitalmars-d-learn
On Monday, 30 August 2021 at 20:26:46 UTC, Benoît Dubreuil wrote: My question is: In the source file `dummy.dummy.d`, why the first labelled attributes `@safe` and `@nogc` have no effect inside the struct's scope? In other words, why do I need to repeat labelled attributes statements in

vibe.d: is it possible to use bare HTML with the functionalty of DIET templates ?

2021-08-30 Thread someone via Digitalmars-d-learn
Regarding vibe.d I think I'll give it a try (maybe placing it behind nginx at first) since I do really got a good first-impression ... kudos to the developers/maintainers :) I like the idea of having D at my disposal within a web page, actually, it is a terrific feature to say the least.

Re: vibe.d community/forum/whatever ?

2021-08-30 Thread someone via Digitalmars-d-learn
On Monday, 30 August 2021 at 06:52:16 UTC, Daniel Kozak wrote: Maybe add a new group to the forum for vibed and redirect https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed there At the *very least* they should remove the link on their home page pointing to the useless forum.

Question on Immutability

2021-08-30 Thread Merlin Diavova via Digitalmars-d-learn
Hi All, I'm trying to understand immutability in D and it seems a bit odd. I'm coming from dynamic languages so please forgive my ignorance and dynamic language-isms. I want to have a base `Project interface` and then extend other more specific interfaces from that such as

Re: Labelled @nogc Working With Inner Scopes

2021-08-30 Thread Ali Çehreli via Digitalmars-d-learn
I don't have a strong opinion on the question but I tend to agree with the current behavior because it's easy to add the attributes anyway. Going off topic, I want to mention that the 'in' and 'out' contracts have a simpler syntax now and that the 'do' (or 'body') keyword is optional in that

Re: Object.dup?

2021-08-30 Thread Adam D Ruppe via Digitalmars-d-learn
On Monday, 30 August 2021 at 20:21:38 UTC, Per Nordlöw wrote: Why doesn't `Object` have an auto-defined `.dup` property? I don't think it could. What if you have a child class with a delegate that points to one of its own methods? You can define one yourself of course with overrides in

Labelled @nogc Working With Inner Scopes

2021-08-30 Thread Benoît Dubreuil via Digitalmars-d-learn
I've got the following module `dummy.dummy.d`: ```d module dummy; @safe: @nogc: struct Dummy { // TODO: Why do I need to repeat those? Aren't the formers still effective for inner scopes? @safe: @nogc: static const int MAX_MEMBER_INT = 3; int memberInt; string memberStr;

Object.dup?

2021-08-30 Thread Per Nordlöw via Digitalmars-d-learn
Why doesn't `Object` have an auto-defined `.dup` property? It would be useful when dealing with, for instance, handling of `Throwable`'s in multi-threaded contexts.

Re: vibe.d community/forum/whatever ?

2021-08-30 Thread Imperatorn via Digitalmars-d-learn
On Monday, 30 August 2021 at 12:51:38 UTC, someone wrote: On Monday, 30 August 2021 at 10:37:38 UTC, Steven Schveighoffer wrote: It used to be moderated somewhat, but I think they gave up (99% of the messages were porn or spam). Why don't they shut down the forum instead ? It makes a

Re: pipeProcess, interactions with stderr ... I am missing something here

2021-08-30 Thread james.p.leblanc via Digitalmars-d-learn
On Monday, 30 August 2021 at 16:51:12 UTC, Ali Çehreli wrote: In this case, converting your ~this to a named function solves the issue: // Was: ~this() void close() { // ... } // ... auto gp = new Gnuplot(); scope (exit) { gp.close(); } Ali Ali Ali, Yet again, you

Re: pipeProcess, interactions with stderr ... I am missing something here

2021-08-30 Thread Ali Çehreli via Digitalmars-d-learn
On 8/30/21 9:35 AM, james.p.leblanc wrote: > D-ers, > > I am attempting to use pipeProcess for interacting with an external > process. > My simplified routine can work somewhat. But, trying to print any messages > that process writes to stderr yields the message: > > (master) gnuplot >

pipeProcess, interactions with stderr ... I am missing something here

2021-08-30 Thread james.p.leblanc via Digitalmars-d-learn
D-ers, I am attempting to use pipeProcess for interacting with an external process. My simplified routine can work somewhat. But, trying to print any messages that process writes to stderr yields the message: (master) gnuplot > gnuplot_example

Re: vibe.d community/forum/whatever ?

2021-08-30 Thread someone via Digitalmars-d-learn
On Monday, 30 August 2021 at 10:37:38 UTC, Steven Schveighoffer wrote: It used to be moderated somewhat, but I think they gave up (99% of the messages were porn or spam). Why don't they shut down the forum instead ? It makes a terrible impression for newcomers -something akin to: naaah,

Re: Interpolate dates

2021-08-30 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Aug 30, 2021 at 12:06:46AM +, Booster via Digitalmars-d-learn wrote: > I have some dates and date-times. I need to interpolate the date-times > from the dates. Try looking at std.datetime perhaps? T -- The diminished 7th chord is the most flexible and fear-instilling chord. Use it

Re: vibe.d community/forum/whatever ?

2021-08-30 Thread someone via Digitalmars-d-learn
On Monday, 30 August 2021 at 06:19:02 UTC, bauss wrote: Just use these forums as pretty much the same people are here that are in the vibe.d community. OK. Thanks :)

Re: vibe.d community/forum/whatever ?

2021-08-30 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/29/21 10:39 PM, someone wrote: https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/ I've been reading vibe.d tour and some documentation today to get some first impressions. https://vibed.org/community pointed to the link above ... but it seems it is full of crap. It used

Re: vibe.d community/forum/whatever ?

2021-08-30 Thread Daniel Kozak via Digitalmars-d-learn
On Mon, Aug 30, 2021 at 8:20 AM bauss via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > On Monday, 30 August 2021 at 02:39:06 UTC, someone wrote: > > https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/ > > > > I've been reading vibe.d tour and some documentation

Re: vibe.d community/forum/whatever ?

2021-08-30 Thread bauss via Digitalmars-d-learn
On Monday, 30 August 2021 at 02:39:06 UTC, someone wrote: https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/ I've been reading vibe.d tour and some documentation today to get some first impressions. https://vibed.org/community pointed to the link above ... but it seems it is