Re: Tricky DMD bug, but I have no idea how to report

2018-12-17 Thread Aliak via Digitalmars-d-learn
On Monday, 17 December 2018 at 21:59:59 UTC, JN wrote: Hey guys, while working on my game engine project, I encountered a DMD codegen bug. It occurs only when compiling in release mode, debug works. Unfortunately I am unable to minimize the code, since it's quite a bit of code, and changing t

Re: saving std.random RNG state

2018-12-17 Thread Neia Neutuladh via Digitalmars-d-learn
On Mon, 17 Dec 2018 22:20:54 +, harfel wrote: > I am looking for a way to serialize/deserialize the state of the > std.random.Random number generator, ideally using orange > (https://github.com/jacob-carlborg/orange) or another serialization > library. From looking at the module source code, I

Re: Doubt about this book: The D Programming Language

2018-12-17 Thread Adam D Ruppe via Digitalmars-d-learn
On Tuesday, 18 December 2018 at 00:36:12 UTC, Ron Tarrant wrote: Are these typos obvious, or is there an errata? They're obvious. Stuff like doubled ; at the end of lines in code samples, or curly quotes when they should be straight. (They are the result of me fighting Microsoft Word and the

Re: Doubt about this book: The D Programming Language

2018-12-17 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Dec 18, 2018 at 12:36:12AM +, Ron Tarrant via Digitalmars-d-learn wrote: > On Monday, 17 December 2018 at 15:32:37 UTC, Adam D. Ruppe wrote: > > > There's a few minor changes in mine (the D Cookbook one), and a few > > typos in the book I didn't catch until too late that mean some > >

Re: Doubt about this book: The D Programming Language

2018-12-17 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 17 December 2018 at 15:32:37 UTC, Adam D. Ruppe wrote: There's a few minor changes in mine (the D Cookbook one), and a few typos in the book I didn't catch until too late that mean some examples won't literally compile anyway, but they are all quite small. Are these typos obvious,

saving std.random RNG state

2018-12-17 Thread harfel via Digitalmars-d-learn
I am looking for a way to serialize/deserialize the state of the std.random.Random number generator, ideally using orange (https://github.com/jacob-carlborg/orange) or another serialization library. From looking at the module source code, I understand how to seed a random number generator with

Re: Tricky DMD bug, but I have no idea how to report

2018-12-17 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Dec 17, 2018 at 09:59:59PM +, JN via Digitalmars-d-learn wrote: [...] > class Texture2D {} > > auto a = new Texture2D(); > auto b = new Texture2D(); > auto c = new Texture2D(); > Texture2D[int] TextureBindings; > writeln(a, b, c); > textureBindings[0] = a; > textureBindings[1] = b; > t

Reverse JSON toPrettyString

2018-12-17 Thread Anonymouse via Digitalmars-d-learn
I have a JSON string[][string] associative array object that I want to take the .toPrettyString value of. However, it sorts the output alphabetically. string[][string] aa = [ "abc" : [], "def" : [], "ghi" : [] ]; auto asJSON = JSONValue(aa); writeln(asJSON.toPrettyString); Output: { "abc"

Tricky DMD bug, but I have no idea how to report

2018-12-17 Thread JN via Digitalmars-d-learn
Hey guys, while working on my game engine project, I encountered a DMD codegen bug. It occurs only when compiling in release mode, debug works. Unfortunately I am unable to minimize the code, since it's quite a bit of code, and changing the code changes the bug occurrence. Basically my faulty

Re: Symbol registerMemoryErrorHandler not found when compiling with LDC

2018-12-17 Thread kinke via Digitalmars-d-learn
On Monday, 17 December 2018 at 15:10:13 UTC, Per Nordlöw wrote: With LDC I get base.d:908: error: undefined reference to '_D3etc5linux11memoryerror26registerMemoryErrorHandlerFZb' https://github.com/ldc-developers/ldc/issues/1915 Arbitrary operations such as writing into some invalid address

Re: dscanner --ctags: local variables, functions, ... are now shown in vim/neovim Tagbar

2018-12-17 Thread David via Digitalmars-d-learn
On Monday, 17 December 2018 at 08:56:07 UTC, Laurent Tréguier wrote: I think that's not possible right now, D-Scanner skips over body functions and unittest blocks to not clutter the tags with potentially lots of local names. A pity; nevertheless many thanks for coming back on it!

Re: Doubt about this book: The D Programming Language

2018-12-17 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 16 December 2018 at 22:02:44 UTC, bachmeier wrote: Sometimes Packt has sales and you can get them pretty cheap. All Packt ebooks are on sale for $5 right now, so this is a great time to pick up both books along with Kai's Vibe.d book.

Re: Doubt about this book: The D Programming Language

2018-12-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 17 December 2018 at 06:08:58 UTC, Jani Hur wrote: Publish dates are 2014 and 2015. How much the language has changed/evolved since then and how much it will evolve in future ? There's a few minor changes in mine (the D Cookbook one), and a few typos in the book I didn't catch until

Symbol registerMemoryErrorHandler not found when compiling with LDC

2018-12-17 Thread Per Nordlöw via Digitalmars-d-learn
Does /// See_Also: https://forum.dlang.org/post/nzazqswxadqzyoghw...@forum.dlang.org static this() { import etc.linux.memoryerror : registerMemoryErrorHandler; registerMemoryErrorHandler(); } only work with DMD? With LDC I get base.d:908: error: undefined reference to '_D3etc5linux1

Re: Shared static this() not executed for unittest

2018-12-17 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, December 16, 2018 12:53:43 PM MST Steven Schveighoffer via Digitalmars-d-learn wrote: > On 12/15/18 5:14 PM, Jonathan M Davis wrote: > > On Saturday, December 15, 2018 10:27:36 AM MST Neia Neutuladh via > > > > Digitalmars-d-learn wrote: > >> On Sat, 15 Dec 2018 17:19:05 +, Timoses

Re: dscanner --ctags: local variables, functions, ... are now shown in vim/neovim Tagbar

2018-12-17 Thread Laurent Tréguier via Digitalmars-d-learn
On Sunday, 16 December 2018 at 09:59:12 UTC, David wrote: I am wondering how I could display (nested) local variables and functions in vim's tagbar (majutsushi/tagbar) using dscanner? So far I only see gloable variables, functions, ... === script.d == import std.stdio; enum gl