www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D Idioms

reply =?UTF-8?B?0JLQuNGC0LDQu9C40Lkg0KTQsNC0?= =?UTF-8?B?0LXQtdCy?= writes:
D Idioms should be in this menu : ( screen )
https://github.com/vitalfadeev/dg2d-improve/raw/master/d-idioms.png

D Idioms : https://p0nce.github.io/d-idioms/
Sep 29 2020
next sibling parent reply data pulverizer <data.pulverizer gmail.com> writes:
On Wednesday, 30 September 2020 at 03:03:47 UTC, Виталий Фадеев 
wrote:
 D Idioms should be in this menu : ( screen )
 https://github.com/vitalfadeev/dg2d-improve/raw/master/d-idioms.png

 D Idioms : https://p0nce.github.io/d-idioms/
Wow, didn't know about this document. I get the feeling there are lots of things like this out there that are "low-key" resources for D. Thanks for posting it.
Oct 02 2020
next sibling parent reply Guillaume Piolat <first.name gmail.com> writes:
On Friday, 2 October 2020 at 10:25:20 UTC, data pulverizer wrote:
 Wow, didn't know about this document. I get the feeling there 
 are lots of things like this out there that are "low-key" 
 resources for D. Thanks for posting it.
Thanks. Writing this documentation was helpful for learning D. Threre are a lot of other topics to explore. For example, did you know that shifting an integer by more than 31 is Undefined Behaviour?
Oct 02 2020
parent reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Fri, Oct 02, 2020 at 03:12:01PM +0000, Guillaume Piolat via Digitalmars-d
wrote:
[...]
 For example, did you know that shifting an integer by more than
 31 is Undefined Behaviour?
This is not surprising; even in C/C++ it's well-known to be UB. T -- The early bird gets the worm. Moral: ewww...
Oct 02 2020
parent Patrick Schluter <Patrick.Schluter bbox.fr> writes:
On Friday, 2 October 2020 at 15:22:37 UTC, H. S. Teoh wrote:
 On Fri, Oct 02, 2020 at 03:12:01PM +0000, Guillaume Piolat via 
 Digitalmars-d wrote: [...]
 For example, did you know that shifting an integer by more 
 than 31 is Undefined Behaviour?
This is not surprising; even in C/C++ it's well-known to be UB.
Yes, and the reason is due to the shift instruction in the CPU's. Some CPU's do the right thing like PowerPC and some do the wrong thing like x86. On x86 SHL instruction masks the shift number that is used, so uint x=1; x << 32 is equivalent to x << (32 & 0x1F) // 0x3F in 64 bits mode which is the same as x and not 0 as If the behaviour was fixed, the compiler would have to add a test in some implementations.
Oct 02 2020
prev sibling parent sarn <sarn theartofmachinery.com> writes:
On Friday, 2 October 2020 at 10:25:20 UTC, data pulverizer wrote:
 On Wednesday, 30 September 2020 at 03:03:47 UTC, Виталий Фадеев 
 wrote:
 D Idioms should be in this menu : ( screen )
 https://github.com/vitalfadeev/dg2d-improve/raw/master/d-idioms.png

 D Idioms : https://p0nce.github.io/d-idioms/
Wow, didn't know about this document. I get the feeling there are lots of things like this out there that are "low-key" resources for D. Thanks for posting it.
There are some more good resources in here: https://github.com/zhaopuming/awesome-d
Oct 02 2020
prev sibling next sibling parent Ferhat =?UTF-8?B?S3VydHVsbXXFnw==?= <aferust gmail.com> writes:
On Wednesday, 30 September 2020 at 03:03:47 UTC, Виталий Фадеев 
wrote:
 D Idioms should be in this menu : ( screen )
 https://github.com/vitalfadeev/dg2d-improve/raw/master/d-idioms.png

 D Idioms : https://p0nce.github.io/d-idioms/
It is a great resource, however, the template of the page feels like "this domain is for sale" to me somehow :D
Oct 02 2020
prev sibling parent reply James Lu <jamtlu gmail.com> writes:
On Wednesday, 30 September 2020 at 03:03:47 UTC, Виталий Фадеев 
wrote:
 D Idioms should be in this menu : ( screen )
 https://github.com/vitalfadeev/dg2d-improve/raw/master/d-idioms.png

 D Idioms : https://p0nce.github.io/d-idioms/
Send a pull request here https://github.com/dlang/dlang.org ?
Oct 06 2020
parent =?UTF-8?B?0JLQuNGC0LDQu9C40Lkg0KTQsNC0?= =?UTF-8?B?0LXQtdCy?= writes:
On Wednesday, 7 October 2020 at 04:36:03 UTC, James Lu wrote:
 On Wednesday, 30 September 2020 at 03:03:47 UTC, Виталий Фадеев 
 wrote:
 D Idioms should be in this menu : ( screen )
 https://github.com/vitalfadeev/dg2d-improve/raw/master/d-idioms.png

 D Idioms : https://p0nce.github.io/d-idioms/
Send a pull request here https://github.com/dlang/dlang.org ?
this will be good
Oct 07 2020