Re: how to make private class member private

2018-03-17 Thread Amorphorious via Digitalmars-d-learn
On Saturday, 17 March 2018 at 23:54:22 UTC, psychoticRabbit wrote: On Saturday, 17 March 2018 at 21:33:01 UTC, Adam D. Ruppe wrote: On Saturday, 17 March 2018 at 21:22:44 UTC, arturg wrote: maybe extend that to a list of types? this is basically what C++ friend does and D was trying to

Re: How to enable verbose logging during application run

2018-03-17 Thread Venkat via Digitalmars-d-learn
Sorry posted the above message by accident. I am running a vibed app using `dub` command. But it produces no logging what so ever when requests are made. The server returns http error codes but it doesn't log anything to the console. How do I make it show me a lot more detail than it is doing

Re: how to make private class member private

2018-03-17 Thread psychoticRabbit via Digitalmars-d-learn
On Saturday, 17 March 2018 at 21:33:01 UTC, Adam D. Ruppe wrote: On Saturday, 17 March 2018 at 21:22:44 UTC, arturg wrote: maybe extend that to a list of types? this is basically what C++ friend does and D was trying to avoid the complexity of Really, the complexity of 'friend' comes from

How to enable verbose logging during application run

2018-03-17 Thread Venkat via Digitalmars-d-learn
I am running a vibed app using `dub` command. But it produces no logging what so ever when re

Re: How to enable verbose logging during application run

2018-03-17 Thread Venkat via Digitalmars-d-learn
Thankyou.

Re: How to enable verbose logging during application run

2018-03-17 Thread rjframe via Digitalmars-d-learn
On Sat, 17 Mar 2018 22:37:36 +, Venkat wrote: > Sorry posted the above message by accident. > > I am running a vibed app using `dub` command. But it produces no logging > what so ever when requests are made. The server returns http error codes > but it doesn't log anything to the console.

Re: how to make private class member private

2018-03-17 Thread psychoticRabbit via Digitalmars-d-learn
On Saturday, 17 March 2018 at 14:16:19 UTC, bauss wrote: I don't like the name @deny . how about: @reallyis private string firstName_; mmm..perhaps not... then how about... @strictly private string firstName_;

Re: how to make private class member private

2018-03-17 Thread bauss via Digitalmars-d-learn
On Saturday, 17 March 2018 at 15:02:21 UTC, psychoticRabbit wrote: On Saturday, 17 March 2018 at 14:16:19 UTC, bauss wrote: I don't like the name @deny . how about: @reallyis private string firstName_; mmm..perhaps not... then how about... @strictly private string firstName_; Still

Re: how to make private class member private

2018-03-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 17 March 2018 at 21:22:44 UTC, arturg wrote: maybe extend that to a list of types? this is basically what C++ friend does and D was trying to avoid the complexity of

How to build static linked executable

2018-03-17 Thread zunkree via Digitalmars-d-learn
Hi, Is there a way to build static linked executable with dub for vibe-d based app? Regards, zunkree

Re: how to make private class member private

2018-03-17 Thread arturg via Digitalmars-d-learn
On Saturday, 17 March 2018 at 14:16:19 UTC, bauss wrote: I don't like the name @deny, personally I would rather see the private attribute changed to something like: private(true) // The member is oly visible to its parent. private(false) // Same as just "private", visible to whole module.

Re: Convert output range to input range

2018-03-17 Thread David Nadlinger via Digitalmars-d-learn
On Friday, 16 March 2018 at 07:57:04 UTC, John Chapman wrote: I need to write to a range created with outputRangeObject, then read from it. Is there a way to convert it to an input range? Could you illustrate your problem a bit further? In the literal sense, converting from an output to an

Re: Can't add ubytes together to make a ubyte... bug or feature?

2018-03-17 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Saturday, 17 March 2018 at 18:36:35 UTC, Jonathan wrote: On Tuesday, 19 January 2016 at 23:36:14 UTC, Adam D. Ruppe wrote: On Tuesday, 19 January 2016 at 22:12:06 UTC, Soviet Friend wrote: I don't care if my computer needs to do math on a 4 byte basis, I'm not writing assembly. x86

Re: Convert output range to input range

2018-03-17 Thread John Chapman via Digitalmars-d-learn
On Saturday, 17 March 2018 at 17:16:40 UTC, David Nadlinger wrote: On Friday, 16 March 2018 at 07:57:04 UTC, John Chapman wrote: I need to write to a range created with outputRangeObject, then read from it. Is there a way to convert it to an input range? Could you illustrate your problem a

Re: Can't add ubytes together to make a ubyte... bug or feature?

2018-03-17 Thread Ali Çehreli via Digitalmars-d-learn
On 03/17/2018 11:36 AM, Jonathan wrote: `(a+b)&0xff` What is this syntax?!  Could you give a link to this in the D documentation? Here is my description of bitwise AND: http://ddili.org/ders/d.en/bit_operations.html#ix_bit_operations.&,%20bitwise%20and The section titled "Masking" on the

Re: How to build static linked executable

2018-03-17 Thread Seb via Digitalmars-d-learn
On Saturday, 17 March 2018 at 14:44:42 UTC, zunkree wrote: Hi, Is there a way to build static linked executable with dub for vibe-d based app? Regards, zunkree Yes, use -static Here's how we build the DTour: https://github.com/dlang-tour/core/blob/master/dub.sdl

Re: How to build static linked executable

2018-03-17 Thread Seb via Digitalmars-d-learn
On Saturday, 17 March 2018 at 15:42:06 UTC, Seb wrote: On Saturday, 17 March 2018 at 14:44:42 UTC, zunkree wrote: Hi, Is there a way to build static linked executable with dub for vibe-d based app? Regards, zunkree Yes, use -static Here's how we build the DTour:

Re: Can't add ubytes together to make a ubyte... bug or feature?

2018-03-17 Thread bauss via Digitalmars-d-learn
On Saturday, 17 March 2018 at 18:56:55 UTC, Dominikus Dittes Scherkl wrote: On Saturday, 17 March 2018 at 18:36:35 UTC, Jonathan wrote: On Tuesday, 19 January 2016 at 23:36:14 UTC, Adam D. Ruppe wrote: On Tuesday, 19 January 2016 at 22:12:06 UTC, Soviet Friend wrote: I don't care if my

Re: Can't add ubytes together to make a ubyte... bug or feature?

2018-03-17 Thread Jonathan via Digitalmars-d-learn
On Tuesday, 19 January 2016 at 23:36:14 UTC, Adam D. Ruppe wrote: On Tuesday, 19 January 2016 at 22:12:06 UTC, Soviet Friend wrote: I don't care if my computer needs to do math on a 4 byte basis, I'm not writing assembly. x86 actually doesn't need to do math that way, if you were writing

Re: Convert output range to input range

2018-03-17 Thread Dukc via Digitalmars-d-learn
On Friday, 16 March 2018 at 08:07:09 UTC, Jonathan M Davis wrote: For instance, std.array.Appender is an output range, and you get a dynamic array out of it, which would be an input range. So, if you have control over what output range you're dealing with, the simplest would be to just use

Re: Convert output range to input range

2018-03-17 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, March 17, 2018 06:58:04 Dukc via Digitalmars-d-learn wrote: > On Friday, 16 March 2018 at 08:07:09 UTC, Jonathan M Davis wrote: > > For instance, std.array.Appender is an output range, and you > > get a dynamic array out of it, which would be an input range. > > So, if you have

Logging Function Parameters

2018-03-17 Thread dom via Digitalmars-d-learn
Hi, I am looking for a method to log the current function name + parameters. Getting the name of the current function is simply possible with __PRETTY_FUNCTION__ Is there some possibility to generically access the parameters of a function such that they can be iterated and printed out?

Re: how to make private class member private

2018-03-17 Thread psychoticRabbit via Digitalmars-d-learn
On Saturday, 17 March 2018 at 09:18:13 UTC, Nick Treleaven wrote: It's a language design decision as to whether a particular feature is worth supporting. I would like this feature too though. I'm not sure how much compiler complexity would be added by having another visibility modifier. D

Re: how to make private class member private

2018-03-17 Thread Nick Treleaven via Digitalmars-d-learn
On Tuesday, 13 March 2018 at 05:11:48 UTC, psychoticRabbit wrote: If you have access to the module source, you have access to the source of types inside it. Making the module the lowest level of encapsulation makes sense from that perspective. There are two problems I see: 1st - D has broken

Re: how to make private class member private

2018-03-17 Thread Nick Treleaven via Digitalmars-d-learn
On Tuesday, 13 March 2018 at 13:59:00 UTC, Steven Schveighoffer wrote: If you limit to class members, then you have to do something like C++ friends, which are unnecessarily verbose. Not if you also have a module-level visibility modifier, which could have been `module`. IMO, the

Re: how to make private class member private

2018-03-17 Thread bauss via Digitalmars-d-learn
On Saturday, 17 March 2018 at 11:08:27 UTC, psychoticRabbit wrote: On Saturday, 17 March 2018 at 09:18:13 UTC, Nick Treleaven wrote: It's a language design decision as to whether a particular feature is worth supporting. I would like this feature too though. I'm not sure how much compiler