Re: Ada to D - an array for storing values of each of the six bits which are sufficient

2015-05-05 Thread Dennis Ritchie via Digitalmars-d-learn
Realized bitmap, sorry that does not work with DMD 2.067.1: http://vlang.org/docs/Data_Types/Bits_and_Logic.html https://github.com/coverify/vlang/blob/master/src/esdl/data/bvec.d

Re: Ada to D - an array for storing values of each of the six bits which are sufficient

2015-05-03 Thread Dennis Ritchie via Digitalmars-d-learn
On Sunday, 3 May 2015 at 14:49:55 UTC, Martin Nowak wrote: On Friday, 1 May 2015 at 23:22:31 UTC, Dennis Ritchie wrote: Maybe someone will show a primitive packed array. I really can not imagine how to do it on D. Look at BitArray for an example https://github.com/D-Programming-Language/phobo

Re: Ada to D - an array for storing values of each of the six bits which are sufficient

2015-05-03 Thread Martin Nowak via Digitalmars-d-learn
On Friday, 1 May 2015 at 23:22:31 UTC, Dennis Ritchie wrote: Maybe someone will show a primitive packed array. I really can not imagine how to do it on D. Look at BitArray for an example https://github.com/D-Programming-Language/phobos/blob/12187d7be8b15b2f5f8ff6889cdb5ea3afb93dd1/std/bitmanip

Re: Ada to D - an array for storing values of each of the six bits which are sufficient

2015-05-02 Thread Dennis Ritchie via Digitalmars-d-learn
On Friday, 1 May 2015 at 23:22:31 UTC, Dennis Ritchie wrote: Maybe someone will show a primitive packed array. I really can not imagine how to do it on D. Maybe you can somehow use bitfields. While what happened is something like this: - import std.stdio, std.bitmanip; s

Re: Ada to D - an array for storing values of each of the six bits which are sufficient

2015-05-01 Thread Dennis Ritchie via Digitalmars-d-learn
Maybe someone will show a primitive packed array. I really can not imagine how to do it on D.

Re: Ada to D - an array for storing values of each of the six bits which are sufficient

2015-05-01 Thread bearophile via Digitalmars-d-learn
Dennis Ritchie: Anybody can write a packed array on the D? I once badly represent the means by which we can write a packed array. Maybe for this you should use core.simd or unions? SIMD could be useful for some fancy bulk operations. But you should be able to write a good basic packed array

Re: Ada to D - an array for storing values of each of the six bits which are sufficient

2015-05-01 Thread Dennis Ritchie via Digitalmars-d-learn
On Thursday, 30 April 2015 at 11:20:55 UTC, bearophile wrote: Dennis Ritchie: There is an array of values to store each of which sufficiently 6 bits. As it is written down on the D? You can't do it directly in D. Someone has to write a packed array data structure to do it. Bye, bearophile

Re: Ada to D - an array for storing values of each of the six bits which are sufficient

2015-04-30 Thread bearophile via Digitalmars-d-learn
Dennis Ritchie: There is an array of values to store each of which sufficiently 6 bits. As it is written down on the D? You can't do it directly in D. Someone has to write a packed array data structure to do it. Bye, bearophile

Ada to D - an array for storing values of each of the six bits which are sufficient

2015-04-30 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, There is an array of values to store each of which sufficiently 6 bits. As it is written down on the D? - With Ada.Text_IO; Use Ada.Text_IO; With Ada.Integer_Text_IO; Use Ada.Integer_Text_IO; procedure Program is type T_Type is range -10 .. 27; for T_Type'Size use 6; type Vect