Re: SecureD Futures (v2.0)

2018-05-27 Thread Adam Wilson via Digitalmars-d
On 05/27/2018 08:52 PM, sarn wrote: On Monday, 28 May 2018 at 02:25:20 UTC, Adam Wilson wrote: I like it. But it does require more space. We need three salts and three lengths in the header. One for the PBKDF2 KDK, one for the MAC key, and one for the encryption key. HKDF-Expand doesn't need

Re: Clash When Using Function as Template Value-Parameters?

2018-05-27 Thread Vijay Nayar via Digitalmars-d
On Sunday, 27 May 2018 at 20:38:25 UTC, Daniel Kozak wrote: I would rewrite it to something like this: template BTree(ValueT, KeyT = ValueT,alias KeyF = unaryFun!"cast(const)a") { class BTree { This is roughly what I originally had, but it creates a number of problems that I wanted

Product Versioning Microservices

2018-05-27 Thread soujanyabargavi via Digitalmars-d
I go into microservices engineering in view of docker and I have 3 microservices, which together make one item for instance "CRM framework". Presently I need my customer to have the capacity to update his item, at whatever point he needs to. I have 3 distinct renditions of my microservices, w

Re: On Forum Moderation

2018-05-27 Thread IntegratedDimensions via Digitalmars-d
On Sunday, 27 May 2018 at 05:30:22 UTC, TheUncivilServant wrote: On Sunday, 27 May 2018 at 04:57:20 UTC, SlimeBag wrote: surely the best form of professional etiquette is to NOT be offended by what others say. as soon as you ignore that etiquette, it's a slippery slope to utlimately control

Re: On Forum Moderation

2018-05-27 Thread Impertinent via Digitalmars-d
On Saturday, 26 May 2018 at 03:34:50 UTC, Walter Bright wrote: From time to time, the issue comes up. The standard here is professional demeanor. For what professional demeanor is, see: https://www.amazon.com/Etiquette-Society-Business-Politics-Home/dp/1497339979 Unprofessional demeanor will

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-27 Thread sarn via Digitalmars-d
On Sunday, 27 May 2018 at 22:27:52 UTC, sarn wrote: I've been thinking this through a bit, and here's what I've got so far: Here's a tweak that should be implementable without any language changes: Instead of trying to detect an empty destructor, we use a UDA on the class --- call it BaseOb

Re: SecureD Futures (v2.0)

2018-05-27 Thread sarn via Digitalmars-d
On Monday, 28 May 2018 at 02:25:20 UTC, Adam Wilson wrote: I like it. But it does require more space. We need three salts and three lengths in the header. One for the PBKDF2 KDK, one for the MAC key, and one for the encryption key. HKDF-Expand doesn't need a salt. You just need one salt to ma

Re: General problem I'm having in D with the type system

2018-05-27 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 05/27/2018 04:50 PM, IntegratedDimensions wrote: On Sunday, 27 May 2018 at 18:16:25 UTC, JN wrote: On Sunday, 27 May 2018 at 06:00:30 UTC, IntegratedDimensions wrote: animal a = new cat(); a.f = new food() auto c = cast(cat)a; as now f in cat will be food rather than catfood. I think th

Re: SecureD Futures (v2.0)

2018-05-27 Thread Adam Wilson via Digitalmars-d
On 05/27/2018 05:11 PM, sarn wrote: On Sunday, 27 May 2018 at 10:27:45 UTC, Adam Wilson wrote: struct cryptoHeader {     ubyte hdrVersion;    // The version of the header     ubyte encAlg;    // The encryption algorithm used     ubyte hashAlg;    // The hash algorithm used     uint  kdfIters;   

Re: SecureD Futures (v2.0)

2018-05-27 Thread sarn via Digitalmars-d
On Sunday, 27 May 2018 at 10:27:45 UTC, Adam Wilson wrote: struct cryptoHeader { ubyte hdrVersion; // The version of the header ubyte encAlg; // The encryption algorithm used ubyte hashAlg; // The hash algorithm used uint kdfIters; // The number of PBKDF2 iterati

Re: General problem I'm having in D with the type system

2018-05-27 Thread IntegratedDimensions via Digitalmars-d
On Sunday, 27 May 2018 at 21:16:46 UTC, Neia Neutuladh wrote: On Sunday, 27 May 2018 at 20:50:14 UTC, IntegratedDimensions wrote: The only problem where it can leak is when we treat an cat as an animal then put in dog food in to the animal, which is valid when cat as treated as an animal, then

Re: DIP 1012--Attributes--Preliminary Review Round 1

2018-05-27 Thread sarn via Digitalmars-d
On Sunday, 27 May 2018 at 13:44:40 UTC, Mike Franklin wrote: I don't know what's happening with this DIP, but I've recently encountered a real-world problem for which there is no palatable workaround that this DIP would likely solve: https://github.com/dlang/druntime/pull/2184#pullrequestrevie

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-27 Thread sarn via Digitalmars-d
On Sunday, 27 May 2018 at 09:55:56 UTC, Mike Franklin wrote: TypeInfo has become my nemesis. I've been trying to replace runtime hooks that depend on TypeInfo with templates that can get their information at compile-time, but I'm running into all sorts of problems. e.g. Did you know array.len

Re: General problem I'm having in D with the type system

2018-05-27 Thread David Nadlinger via Digitalmars-d
On Sunday, 27 May 2018 at 06:00:30 UTC, IntegratedDimensions wrote: […] This is a potential suggestion for including such a feature in the D language to provide sightly more consistency. Solving this in the general case requires explicitly allowing, specifying, and tracking covariance and cont

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-27 Thread sarn via Digitalmars-d
On Sunday, 27 May 2018 at 21:11:42 UTC, 12345swordy wrote: On Sunday, 27 May 2018 at 18:55:41 UTC, Mike Franklin wrote: And see this talk for a demonstration of the benefits https://www.youtube.com/watch?v=endKC3fDxqs Mike Can you actually reply to me instead of saying "read/watch this"? I'

Re: General problem I'm having in D with the type system

2018-05-27 Thread IntegratedDimensions via Digitalmars-d
On Sunday, 27 May 2018 at 06:59:43 UTC, Vijay Nayar wrote: On Sunday, 27 May 2018 at 06:00:30 UTC, IntegratedDimensions wrote: The problem description is not very clear, but the catfood example gives a bit more to work with. animal -> food || vv cat ->

Re: General problem I'm having in D with the type system

2018-05-27 Thread Neia Neutuladh via Digitalmars-d
On Sunday, 27 May 2018 at 20:50:14 UTC, IntegratedDimensions wrote: The only problem where it can leak is when we treat an cat as an animal then put in dog food in to the animal, which is valid when cat as treated as an animal, then cast back to cat. Now cat has dog food, which is invalid. It

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-27 Thread 12345swordy via Digitalmars-d
On Sunday, 27 May 2018 at 18:55:41 UTC, Mike Franklin wrote: On Sunday, 27 May 2018 at 16:06:21 UTC, 12345swordy wrote: You are replacing runtime typeinfo with compiletime templates. Unless you can guarantee that the type information won't change during runtime, you are going to have a hard ti

Re: General problem I'm having in D with the type system

2018-05-27 Thread Basile B. via Digitalmars-d
On Sunday, 27 May 2018 at 06:00:30 UTC, IntegratedDimensions wrote: (see my other most recent post for disclaimer) My designs generally work like this: Main Type uses Subservient types A a B b C c where C : B : A, c :

Re: General problem I'm having in D with the type system

2018-05-27 Thread IntegratedDimensions via Digitalmars-d
On Sunday, 27 May 2018 at 18:16:25 UTC, JN wrote: On Sunday, 27 May 2018 at 06:00:30 UTC, IntegratedDimensions wrote: animal a = new cat(); a.f = new food() auto c = cast(cat)a; as now f in cat will be food rather than catfood. I think the problem is in your hierarchy. If Animal can have F

Re: Clash When Using Function as Template Value-Parameters?

2018-05-27 Thread Daniel Kozak via Digitalmars-d
I would rewrite it to something like this: import std.stdio; import std.functional; template BTree(ValueT, KeyT = ValueT,alias KeyF = unaryFun!"cast(const)a") { class BTree { auto getKey(ValueT val) { return KeyF(val); } } } void main() { auto btree1 =

Re: SecureD Futures (v2.0)

2018-05-27 Thread Adam Wilson via Digitalmars-d
On 05/27/2018 09:54 AM, Neia Neutuladh wrote: On Sunday, 27 May 2018 at 10:27:45 UTC, Adam Wilson wrote: Now that SecureD v1 is in the books This would have been a great place to insert a brief description of what SecureD is or a link to the project. Good point. SecureD is a cryptography li

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-27 Thread Mike Franklin via Digitalmars-d
On Sunday, 27 May 2018 at 16:06:21 UTC, 12345swordy wrote: You are replacing runtime typeinfo with compiletime templates. Unless you can guarantee that the type information won't change during runtime, you are going to have a hard time. Read this thread for context https://forum.dlang.org/po

Re: General problem I'm having in D with the type system

2018-05-27 Thread JN via Digitalmars-d
On Sunday, 27 May 2018 at 06:00:30 UTC, IntegratedDimensions wrote: animal a = new cat(); a.f = new food() auto c = cast(cat)a; as now f in cat will be food rather than catfood. I think the problem is in your hierarchy. If Animal can have Food, that means that any animal should be able to a

Re: SecureD Futures (v2.0)

2018-05-27 Thread Neia Neutuladh via Digitalmars-d
On Sunday, 27 May 2018 at 10:27:45 UTC, Adam Wilson wrote: Now that SecureD v1 is in the books This would have been a great place to insert a brief description of what SecureD is or a link to the project.

Re: On Forum Moderation

2018-05-27 Thread 12345swordy via Digitalmars-d
On Sunday, 27 May 2018 at 04:01:27 UTC, 12345swordy wrote: On Saturday, 26 May 2018 at 07:35:31 UTC, Dukc wrote: On Saturday, 26 May 2018 at 03:34:50 UTC, Walter Bright wrote: For unprofessional demeanor, I recommend reddit. Wat?!? Enough of the sex talk here. Stop

Database rollback

2018-05-27 Thread Vladimir Panteleev via Digitalmars-d
Hello, Due to an error during emergency server maintenance yesterday, some data was deleted. This includes forum.dlang.org and wiki.dlang.org databases. I managed to recover the MySQL databases, so wiki.dlang.org should work as before. Unfortunately, the last working backup of the forum.dla

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-27 Thread 12345swordy via Digitalmars-d
On Sunday, 27 May 2018 at 09:55:56 UTC, Mike Franklin wrote: On Friday, 25 May 2018 at 23:47:33 UTC, sarn wrote: [...] I'm very much interested in doing something about these functions. __xdtor is just one. There are others at https://github.com/dlang/druntime/blob/54ab96e9977e0c6baa7ed97

Re: Draft for DIP concerning destroy is up.

2018-05-27 Thread 12345swordy via Digitalmars-d
On Sunday, 27 May 2018 at 09:04:20 UTC, Go-Write-A-DIP wrote: On Saturday, 26 May 2018 at 02:25:30 UTC, 12345swordy wrote: k Though I had posted a thread regarding my DIP and no one seems to care. Alex When someone has an idea, that you don't care about, you tell them to go write a DIP

Re: DIP 1012--Attributes--Preliminary Review Round 1

2018-05-27 Thread Mike Franklin via Digitalmars-d
On Thursday, 27 July 2017 at 14:44:23 UTC, Mike Parker wrote: DIP 1012 is titled "Attributes". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1012.md All review-related feedback on and discussion of the DIP should occur in this thread. The review period will end at 11:59 PM ET on August 10

Re: SecureD Futures (v2.0)

2018-05-27 Thread Dmitry Olshansky via Digitalmars-d
On Sunday, 27 May 2018 at 10:27:45 UTC, Adam Wilson wrote: Now that SecureD v1 is in the books I thought it would be worthwhile to explore what a second version could like. I specifically want to focus on expanding compatibility with other systems. [...] No, it’s not. Look at IOpipe and no

SecureD Futures (v2.0)

2018-05-27 Thread Adam Wilson via Digitalmars-d
Now that SecureD v1 is in the books I thought it would be worthwhile to explore what a second version could like. I specifically want to focus on expanding compatibility with other systems. For example: AWS uses SHA2-256 for signing requests. As implemented today SecureD does not support this.

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-27 Thread Mike Franklin via Digitalmars-d
On Friday, 25 May 2018 at 23:47:33 UTC, sarn wrote: That std.signals code that Steven filed a bug report for is example of why we can't just fix the behaviour, though. If we just fixed __dtor/__xdtor, any code that used std.signals would start having ugly bugs at run time. I think that long

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-27 Thread Mike Franklin via Digitalmars-d
On Wednesday, 23 May 2018 at 19:05:38 UTC, Manu wrote: For my money it would be: destroy() <- just destroy reset() <- destroy and re-init Or something like that. Maybe: class.destruct(); <- destroy without init? Yeah that. I'll make a PR! I had an in-depth discussion with Andrei about this

Re: Draft for DIP concerning destroy is up.

2018-05-27 Thread Go-Write-A-DIP via Digitalmars-d
On Saturday, 26 May 2018 at 02:25:30 UTC, 12345swordy wrote: k Though I had posted a thread regarding my DIP and no one seems to care. Alex When someone has an idea, that you don't care about, you tell them to go write a DIP. Apparently, that is the more acceptable 'etiquette', rather

Re: Friends in D, a new idiom?

2018-05-27 Thread Vijay Nayar via Digitalmars-d
On Sunday, 27 May 2018 at 06:37:56 UTC, IntegratedDimensions wrote: I'm looking for something lightweight and direct. It is not for total encapsulation control but to simply provide an extra level of indirection for write access to make the object look read only to those that directly use it.

Re: Clash When Using Function as Template Value-Parameters?

2018-05-27 Thread Vijay Nayar via Digitalmars-d
On Saturday, 26 May 2018 at 11:56:30 UTC, Vijay Nayar wrote: The error is: ``` onlineapp.d(8): Error: function literal `__lambda6(char a)` is not callable using argument types `(int)` onlineapp.d(8):cannot pass argument `val` of type `int` to parameter `char a` onlineapp.d(15): Error: t

Re: General problem I'm having in D with the type system

2018-05-27 Thread Vijay Nayar via Digitalmars-d
On Sunday, 27 May 2018 at 06:00:30 UTC, IntegratedDimensions wrote: The problem description is not very clear, but the catfood example gives a bit more to work with. animal -> food || vv cat -> catfood Of course, I'm not sure how to avoid the problem i