a way of approximating "API internal" visibility?

2019-05-17 Thread DanielG via Digitalmars-d-learn
I'm working on a library spread across multiple modules/packages. Sometimes I have symbols that I would like to share between internal packages, but I don't want to make 'public' because then it would be exposed to the client-facing API. To a degree this could be gotten around by making things

Meson build system user learning D.

2019-05-17 Thread Mike Brockus via Digitalmars-d-learn
Hello there this is your hometown Meson build system user here just happen to have a question related to unit testing in D. So is there a way to run the unit-test in the test main as a costume test runner in "test/test.d", and run the executable program in "src/main.d", with this resulting in

Re: 1 - 17 ms, 553 ╬╝s, and 1 hnsec

2019-05-17 Thread evilrat via Digitalmars-d-learn
On Thursday, 16 May 2019 at 15:19:03 UTC, Alex wrote: 1 - 17 ms, 553 ╬╝s, and 1 hnsec fancy useless asci hieroglyphic Holy shirt! All that time I was thinking this is just some sort of encoding artifacts in terminal(common problem on windows), especially because IIRC on Linux it is displayi

Re: 1 - 17 ms, 553 ╬╝s, and 1 hnsec

2019-05-17 Thread Alex via Digitalmars-d-learn
On Friday, 17 May 2019 at 18:02:04 UTC, kdevel wrote: On Thursday, 16 May 2019 at 20:31:23 UTC, Vladimir Panteleev wrote: On Thursday, 16 May 2019 at 20:17:37 UTC, Steven Schveighoffer [...] hnsecs is more confusing than nanoseconds. People know what a nanosecond is, a hecto-nano-second is n

Re: 1 - 17 ms, 553 ╬╝s, and 1 hnsec

2019-05-17 Thread kdevel via Digitalmars-d-learn
On Friday, 17 May 2019 at 20:30:56 UTC, Bastiaan Veelo wrote: On Friday, 17 May 2019 at 18:36:00 UTC, ag0aep6g wrote: I'd suggest "17 ms, and 553.1µs" for a better default (1 hns is 0.1 µs, right?). No weird "hnsecs", no false precision, still all the data that is there. I was going to propos

Re: 1 - 17 ms, 553 ╬╝s, and 1 hnsec

2019-05-17 Thread Bastiaan Veelo via Digitalmars-d-learn
On Friday, 17 May 2019 at 18:36:00 UTC, ag0aep6g wrote: I'd suggest "17 ms, and 553.1µs" for a better default (1 hns is 0.1 µs, right?). No weird "hnsecs", no false precision, still all the data that is there. I was going to propose the same. Hns is weird. Bastiaan.

Re: 1 - 17 ms, 553 ╬╝s, and 1 hnsec

2019-05-17 Thread ag0aep6g via Digitalmars-d-learn
On 16.05.19 17:55, Vladimir Panteleev wrote: On Thursday, 16 May 2019 at 15:52:05 UTC, Steven Schveighoffer wrote: [...] The output shouldn't involve the inner workings of the type. It should be changed to say 10 ns. If the output is meant for the developer, then I disagree subjectively, as

Re: Framework design, initialization and framework usage

2019-05-17 Thread kdevel via Digitalmars-d-learn
On Monday, 13 May 2019 at 09:25:05 UTC, ztop wrote: [...] The old site is archived in wayback https://web.archive.org/web/20180103191733/http://antigrain.com/ Thanks. That is the page I have been looking for: https://web.archive.org/web/20180306023416/http://www.antigrain.com/research/font_ra

Re: 1 - 17 ms, 553 ╬╝s, and 1 hnsec

2019-05-17 Thread kdevel via Digitalmars-d-learn
On Thursday, 16 May 2019 at 20:31:23 UTC, Vladimir Panteleev wrote: On Thursday, 16 May 2019 at 20:17:37 UTC, Steven Schveighoffer [...] hnsecs is more confusing than nanoseconds. People know what a nanosecond is, a hecto-nano-second is not as familiar a term. Agreed, which is why Duration.

Re: Blog Post #0036 - File Dialog - Open a Single File

2019-05-17 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 17 May 2019 at 12:14:51 UTC, drug wrote: TreeView widget needs to be implemented. So still I have no a solution that satisfy me completely. Yeah, they're confusing, for sure. If you don't need anything elaborate, you might have a look at this: https://github.com/rontarrant/gtkDcodi

Re: Blog Post #0036 - File Dialog - Open a Single File

2019-05-17 Thread drug via Digitalmars-d-learn
On 17.05.2019 14:39, Ron Tarrant wrote: On Friday, 17 May 2019 at 11:12:41 UTC, Alex wrote: ListStore and TreeStore and how they interact with TreeView and ComboBox via TreeIter, TreeSelection, etc., etc. That's taking most of my time ATM. That would be really nice! My use case is a large list

Re: Blog Post #0036 - File Dialog - Open a Single File

2019-05-17 Thread Ron Tarrant via Digitalmars-d-learn
On Friday, 17 May 2019 at 11:12:41 UTC, Alex wrote: movable icons that can be interacted with using the icon by dragging them around in a DrawingArea. So if you need ideas to for another tutorial... Yup, this type of thing is on my todo list, but my lead time is around six weeks ATM, so i

Re: Dlang + emscripten

2019-05-17 Thread SrMordred via Digitalmars-d-learn
On Thursday, 16 May 2019 at 19:27:15 UTC, Dukc wrote: On Thursday, 16 May 2019 at 18:23:12 UTC, SrMordred wrote: [...] Nice will take a look on this two, thanks :)

Re: Blog Post #0036 - File Dialog - Open a Single File

2019-05-17 Thread Alex via Digitalmars-d-learn
On Friday, 17 May 2019 at 09:24:59 UTC, Ron Tarrant wrote: The second post this week continues the series on Dialogs. This one is about opening files and can be found here: http://gtkdcoding.com/2019/05/17/0036-file-open-dialogs.html So, I'm using gtkD and eventually I'll have the need to use

Blog Post #0036 - File Dialog - Open a Single File

2019-05-17 Thread Ron Tarrant via Digitalmars-d-learn
The second post this week continues the series on Dialogs. This one is about opening files and can be found here: http://gtkdcoding.com/2019/05/17/0036-file-open-dialogs.html

Re: Stack-based @nogc dynamic array

2019-05-17 Thread Kagamin via Digitalmars-d-learn
On Friday, 17 May 2019 at 06:58:54 UTC, Marco de Wild wrote: Thank you. I've looked into it, and it appears to be quite a big library. I've looked into mach.collect and mach.range, but I didn't manage to find what I was looking for (a simple array data structure). Do you recommend to look into

Re: Stack-based @nogc dynamic array

2019-05-17 Thread Mike Franklin via Digitalmars-d-learn
On Thursday, 16 May 2019 at 12:16:26 UTC, Marco de Wild wrote: Or are there any tips to roll my own implementation? I took a stab at it: --- @nogc: nothrow: pure: struct NoGcArray(size_t maxSize, T) { private T[maxSize] _buffer; private T[] _slice; private size_t _frontIndex;

Re: Stack-based @nogc dynamic array

2019-05-17 Thread Marco de Wild via Digitalmars-d-learn
Thank you both for the quick replies. On Thursday, 16 May 2019 at 12:55:34 UTC, Kagamin wrote: Try mach.d https://github.com/pineapplemachine/mach.d it uses explicit range accessors for iteration. Thank you. I've looked into it, and it appears to be quite a big library. I've looked into mach.

Re: Stack-based @nogc dynamic array

2019-05-17 Thread Marco de Wild via Digitalmars-d-learn
On Thursday, 16 May 2019 at 12:45:03 UTC, Adam D. Ruppe wrote: I think you have overcomplicated something quite simple. int[4] buffer; int bufferLength; buffer[bufferLength++] = item_to_append; buffer[bufferLength++] = item_to_append; int[] slice = buffer[0 .. bufferLength]; // you can use sl