Re: Example for Mir-Random fails

2021-04-03 Thread Brad via Digitalmars-d-learn
On Saturday, 3 April 2021 at 20:55:40 UTC, Preetpal wrote: On Saturday, 3 April 2021 at 19:02:34 UTC, Brad wrote: Obviously it is a type mismatch - I have tried using to!uint to convert the result from unpredictableSeed to a type that will match - but that just causes more errors. Thank you

Re: Example for Mir-Random fails

2021-04-03 Thread Brad via Digitalmars-d-learn
On Saturday, 3 April 2021 at 22:04:33 UTC, Bastiaan Veelo wrote: On Saturday, 3 April 2021 at 19:02:34 UTC, Brad wrote: I just do not know enough about the D libraries to figure out what is wrong. I know it is a case of type mismatch. The example appears on the Mir-Random page as listed

Example for Mir-Random fails

2021-04-03 Thread Brad via Digitalmars-d-learn
I just do not know enough about the D libraries to figure out what is wrong. I know it is a case of type mismatch. The example appears on the Mir-Random page as listed under DUB: https://code.dlang.org/packages/mir-random The code looks like this: ```d void main() { import mir.random;

Creating a .di file for a custom C library

2021-03-29 Thread Brad via Digitalmars-d-learn
I would like to use an updated version of the Termbox library (written in C) with D. I have the .h file. This is new territory for me (why try something easy - right?). I think I need to create a .di file that corresponds to the .h file. I also suspect that I need to put the library file

Re: Windows Console and writing Unicode characters

2021-03-29 Thread Brad via Digitalmars-d-learn
On Monday, 29 March 2021 at 11:53:32 UTC, Adam D. Ruppe wrote: On Monday, 29 March 2021 at 02:12:57 UTC, Brad wrote: [...] You can still import std.stdio and use other functions with just the one overridden. D handles name lookups by just ... well, looking up lol. It starts in the current

Windows Console and writing Unicode characters

2021-03-28 Thread Brad via Digitalmars-d-learn
I am new here so I will post this in Learn. I have been doing a bit of reading on printing unicode characters in the Windows Console. Specifically W10 command prompt. I ran across a post by Adam Ruppe in a thread created a couple years ago which links a short bit of code and a quick

Immutable

2021-03-27 Thread Brad via Digitalmars-d-learn
I was looking through lots of sample code on Rosetta Code. D has a lot of solutions out there. That is really nice but it has me wondering - coming from other languages that do not support the concept of immutability - do real world programmers and/or hobbyists really use it as much as I see