Re: How will std.allocator change how we program in D?

2015-10-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, October 02, 2015 23:54:15 Taylor Hillegeist via Digitalmars-d-learn wrote: > I do not come from a c++ background. but have looked at what > allocators do for c++. I know in D the standard for memory > management is garbage collection and if we want to manage it > ourselfs we have to do

Re: AWS API Dlang, hmac sha256 function.

2015-10-03 Thread Rikki Cattermole via Digitalmars-d-learn
On 04/10/15 1:09 AM, holo wrote: On Saturday, 3 October 2015 at 05:02:58 UTC, Rikki Cattermole wrote: On 03/10/15 6:01 PM, Rikki Cattermole wrote: On 03/10/15 4:54 PM, holo wrote: On Saturday, 3 October 2015 at 03:15:21 UTC, Rikki Cattermole wrote: You could implement it yourself, (it looks

Re: AWS API Dlang, hmac sha256 function.

2015-10-03 Thread Rikki Cattermole via Digitalmars-d-learn
On 04/10/15 1:49 AM, holo wrote: On Saturday, 3 October 2015 at 12:22:11 UTC, Rikki Cattermole wrote: On 04/10/15 1:09 AM, holo wrote: On Saturday, 3 October 2015 at 05:02:58 UTC, Rikki Cattermole wrote: On 03/10/15 6:01 PM, Rikki Cattermole wrote: On 03/10/15 4:54 PM, holo wrote: [...]

Re: AWS API Dlang, hmac sha256 function.

2015-10-03 Thread yawniek via Digitalmars-d-learn
On Saturday, 3 October 2015 at 03:11:06 UTC, holo wrote: Hello I'm trying to contact AWS API with D according to documentation: [...] check https://github.com/yannick/vibe-aws it has v4 implemented

Re: How will std.allocator change how we program in D?

2015-10-03 Thread Rikki Cattermole via Digitalmars-d-learn
On 03/10/15 12:54 PM, Taylor Hillegeist wrote: I do not come from a c++ background. but have looked at what allocators do for c++. I know in D the standard for memory management is garbage collection and if we want to manage it ourselfs we have to do things like @nogc. I was just curious how the

Re: __simd_sto confusion

2015-10-03 Thread Marco Leise via Digitalmars-d-learn
This is a bug in overload resolution when __vector(void[16]) is involved. You can go around it by changing float4 to void16, only to run into an internal compiler error: backend/gother.c 988 So file a bug for both @ issues.dlang.org Also it looks like DMD wants you to use the return value of the

Re: AWS API Dlang, hmac sha256 function.

2015-10-03 Thread holo via Digitalmars-d-learn
On Saturday, 3 October 2015 at 12:22:11 UTC, Rikki Cattermole wrote: On 04/10/15 1:09 AM, holo wrote: On Saturday, 3 October 2015 at 05:02:58 UTC, Rikki Cattermole wrote: On 03/10/15 6:01 PM, Rikki Cattermole wrote: On 03/10/15 4:54 PM, holo wrote: [...] By the looks of that error message

Re: How to use std.range.interfaces in pure @safe code

2015-10-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, October 02, 2015 19:45:05 Freddy via Digitalmars-d-learn wrote: > How do I use http://dlang.org/phobos/std_range_interfaces.html in > pure @safe code? You don't. None of the functions in those interfaces are marked with @safe or pure. One of the problems with classes is that you're

Re: AWS API Dlang, hmac sha256 function.

2015-10-03 Thread holo via Digitalmars-d-learn
On Saturday, 3 October 2015 at 12:50:58 UTC, Rikki Cattermole wrote: On 04/10/15 1:49 AM, holo wrote: On Saturday, 3 October 2015 at 12:22:11 UTC, Rikki Cattermole wrote: On 04/10/15 1:09 AM, holo wrote: [...] By the looks of things the problem is with SHA256, I'm guessing it doesn't have

Re: AWS API Dlang, hmac sha256 function.

2015-10-03 Thread holo via Digitalmars-d-learn
On Saturday, 3 October 2015 at 05:02:58 UTC, Rikki Cattermole wrote: On 03/10/15 6:01 PM, Rikki Cattermole wrote: On 03/10/15 4:54 PM, holo wrote: On Saturday, 3 October 2015 at 03:15:21 UTC, Rikki Cattermole wrote: You could implement it yourself, (it looks pretty easy). Or go the route of

__simd_sto confusion

2015-10-03 Thread Nachtraaf via Digitalmars-d-learn
I'm trying to create some linear algebra functions using simd intrinsics. I watched the dconf 2013 presentation by Manu Evans but i'm still confused about some aspects and the following piece of code doesn't work. I'm trying to copy the result of a dot product from the register to memory but

Re: OT: interesting talk by Jane Street technical guy on why they used Ocaml

2015-10-03 Thread Mengu via Digitalmars-d-learn
On Saturday, 3 October 2015 at 01:41:55 UTC, Laeeth Isharc wrote: https://www.youtube.com/watch?v=hKcOkWzj0_s a little old but still relevant. talks about importance of brevity and strong types for readability (also avoiding boilerplate). two of the partners there committed to read every

Re: OT: interesting talk by Jane Street technical guy on why they used Ocaml

2015-10-03 Thread Laeeth Isharc via Digitalmars-d-learn
On Saturday, 3 October 2015 at 15:58:38 UTC, Mengu wrote: On Saturday, 3 October 2015 at 01:41:55 UTC, Laeeth Isharc wrote: https://www.youtube.com/watch?v=hKcOkWzj0_s a little old but still relevant. talks about importance of brevity and strong types for readability (also avoiding

Re: AWS API Dlang, hmac sha256 function.

2015-10-03 Thread Vladimir Panteleev via Digitalmars-d-learn
On Saturday, 3 October 2015 at 03:11:06 UTC, holo wrote: Last but not least, how to write such function in D: def sign(key, msg): return hmac.new(key, msg.encode("utf-8"), hashlib.sha256).digest() ? I can't find in standard libraryt hmac function, is it existing? The next version of D

buffered output to files

2015-10-03 Thread Gerald Jansen via Digitalmars-d-learn
In this great article [1] there is a brief section on buffered output to files. Also in this thread [2] I was advised to use explicitly buffered output for maximum performance. This left me perplexed: surely any high-level routines already use buffered IO, no? [1]

Re: __simd_sto confusion

2015-10-03 Thread Nachtraaf via Digitalmars-d-learn
On Saturday, 3 October 2015 at 15:39:33 UTC, Marco Leise wrote: This is a bug in overload resolution when __vector(void[16]) is involved. You can go around it by changing float4 to void16, only to run into an internal compiler error: backend/gother.c 988 So file a bug for both @

Re: OT: interesting talk by Jane Street technical guy on why they used Ocaml

2015-10-03 Thread Mengu via Digitalmars-d-learn
On Saturday, 3 October 2015 at 16:33:38 UTC, Laeeth Isharc wrote: On Saturday, 3 October 2015 at 15:58:38 UTC, Mengu wrote: On Saturday, 3 October 2015 at 01:41:55 UTC, Laeeth Isharc wrote: https://www.youtube.com/watch?v=hKcOkWzj0_s a little old but still relevant. talks about importance of

Re: __simd_sto confusion

2015-10-03 Thread Marco Leise via Digitalmars-d-learn
Am Sat, 03 Oct 2015 23:42:22 + schrieb Nachtraaf : > I changed the type of result to void16 like this: > > float dot_simd1(float4 a, float4 b) > { > void16 result = __simd(XMM.DPPS, a, b, 0xFF); > float value; > __simd_sto(XMM.STOSS, value, result); >

Re: AWS API Dlang, hmac sha256 function.

2015-10-03 Thread Rikki Cattermole via Digitalmars-d-learn
On 04/10/15 2:31 AM, holo wrote: On Saturday, 3 October 2015 at 12:50:58 UTC, Rikki Cattermole wrote: On 04/10/15 1:49 AM, holo wrote: On Saturday, 3 October 2015 at 12:22:11 UTC, Rikki Cattermole wrote: On 04/10/15 1:09 AM, holo wrote: [...] By the looks of things the problem is with

Re: Threading Questions

2015-10-03 Thread bitwise via Digitalmars-d-learn
On Tuesday, 29 September 2015 at 19:10:58 UTC, Steven Schveighoffer wrote: An object that implements the Monitor interface may not actually be a mutex. For example, a pthread_cond_t requires a pthread_mutex_t to operate properly. Right! I feel like I should have caught the fact that

Re: Cameleon: Stricter Alternative Implementation of VariantN

2015-10-03 Thread Nordlöw via Digitalmars-d-learn
On Monday, 21 September 2015 at 13:42:14 UTC, Nordlöw wrote: The code is here: https://github.com/nordlow/justd/blob/master/cameleon.d Moved to https://github.com/nordlow/justd/blob/master/vary.d Templates are no called: - FastVariant - PackedVariant

Re: OT: interesting talk by Jane Street technical guy on why they used Ocaml

2015-10-03 Thread Laeeth Isharc via Digitalmars-d-learn
On Sunday, 4 October 2015 at 00:45:16 UTC, Mengu wrote: i watched this talk by yaron last year when i was looking at alternatives for sml. i was taking the programming languages course on coursera by dan grossman. ocaml looked like it tooked off at the beginning of 2000s but then due to many