Re: Structure of platform specific vs non platform specific code

2017-05-09 Thread rikki cattermole via Digitalmars-d-learn
On 09/05/2017 7:08 PM, Igor wrote: On Tuesday, 9 May 2017 at 15:37:44 UTC, Stefan Koch wrote: On Tuesday, 9 May 2017 at 15:28:20 UTC, WhatMeWorry wrote: On Monday, 8 May 2017 at 21:16:53 UTC, Igor wrote: Hi, I am following Casey Muratori's Handmade Hero and writing it in DLang. This sounds

Access specifiers and visibility

2017-05-09 Thread Andrew Edwards via Digitalmars-d-learn
Attempting to update a git repo to current D, I encounter the following deprecation messages: src/glwtf/signals.d-mixin-256(256,2): Deprecation: glwtf.input.BaseGLFWEventHandler._on_key_down is not visible from module glwtf.signals src/glwtf/signals.d-mixin-256(256,2): Deprecation: glwtf.inpu

Re: "Rolling Hash computation" or "Content Defined Chunking"

2017-05-09 Thread 9il via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 18:17:45 UTC, notna wrote: I hoped there may already be something in Mir or Weka.io or somewhere else... Will read the Golang, C and C++ source and see if my Dlang is good enough for ranges and the like magic... Hello notha, You may want to open a PR to mir-algorit

Re: Looking for an equivalent to C++ std::getline in D

2017-05-09 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 19:11:08 UTC, Jonathan M Davis wrote: LOL. I get the impression that it's often the tendancy of D folks is to get excited when D shows up as high in a list like Tiobe and to argue that the list doesn't mean much if D isn't high in the list. AKA confirmation bias. Not

Re: Looking for an equivalent to C++ std::getline in D

2017-05-09 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, May 08, 2017 11:41:02 Daniel N via Digitalmars-d-learn wrote: > On Monday, 8 May 2017 at 10:51:52 UTC, Ola Fosheim Grøstad wrote: > > On Sunday, 7 May 2017 at 20:50:10 UTC, Patrick Schluter wrote: > >> If you look on TIOBE [1] newest stats, D does not look so bad > >> after all. It's ran

Re: "Rolling Hash computation" or "Content Defined Chunking"

2017-05-09 Thread notna via Digitalmars-d-learn
On Saturday, 6 May 2017 at 07:21:51 UTC, Johannes Pfau wrote: Am Mon, 01 May 2017 21:01:43 + schrieb notna : Hi Dlander's. Found some interesting reads ([1] [2] [3]) about the $SUBJECT and wonder if there is anything available in the Dland?! If yes, pls. share. If not, how could it be d

Re: Scope checking on static array struct doesn't kick in

2017-05-09 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 13:30:49 UTC, Nordlöw wrote: I'll write a Bugzilla issue later today. https://issues.dlang.org/show_bug.cgi?id=17388

Re: Structure of platform specific vs non platform specific code

2017-05-09 Thread Igor via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 15:37:44 UTC, Stefan Koch wrote: On Tuesday, 9 May 2017 at 15:28:20 UTC, WhatMeWorry wrote: On Monday, 8 May 2017 at 21:16:53 UTC, Igor wrote: Hi, I am following Casey Muratori's Handmade Hero and writing it in DLang. This sounds very interesting. Maybe make it a

Re: Structure of platform specific vs non platform specific code

2017-05-09 Thread Stefan Koch via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 15:28:20 UTC, WhatMeWorry wrote: On Monday, 8 May 2017 at 21:16:53 UTC, Igor wrote: Hi, I am following Casey Muratori's Handmade Hero and writing it in DLang. This sounds very interesting. Maybe make it a public github project? It can only accessible for those w

Re: Structure of platform specific vs non platform specific code

2017-05-09 Thread WhatMeWorry via Digitalmars-d-learn
On Monday, 8 May 2017 at 21:16:53 UTC, Igor wrote: Hi, I am following Casey Muratori's Handmade Hero and writing it in DLang. This sounds very interesting. Maybe make it a public github project?

Re: Error writing file a *.obj

2017-05-09 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 02:33:06 UTC, dummy wrote: On Monday, 8 May 2017 at 12:29:27 UTC, bachmeier wrote: On Monday, 8 May 2017 at 11:56:10 UTC, dummy wrote: When i build some application with dub, i got this error: I'm not a Dub user, but it has its own forum, so you might want to try t

Re: Structure of platform specific vs non platform specific code

2017-05-09 Thread rikki cattermole via Digitalmars-d-learn
On 09/05/2017 2:53 PM, Jacob Carlborg wrote: On 2017-05-08 23:16, Igor wrote: Hi, I am following Casey Muratori's Handmade Hero and writing it in DLang. I got to Day 011: The Basics of Platform API Design where Casey explains the best way to structure platform specific vs non-platform specific

Re: Structure of platform specific vs non platform specific code

2017-05-09 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-05-08 23:16, Igor wrote: Hi, I am following Casey Muratori's Handmade Hero and writing it in DLang. I got to Day 011: The Basics of Platform API Design where Casey explains the best way to structure platform specific vs non-platform specific code but his method cannot work in DLang since

Re: Scope checking on static array struct doesn't kick in

2017-05-09 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 12:25:29 UTC, Nordlöw wrote: On Tuesday, 9 May 2017 at 11:52:35 UTC, Nordlöw wrote: I've tagged the ref-returning functions (in this case `opSlice`) with `return scope` for my statically allocated array struct at Here's a simpler example https://github.com/nordlow/p

Re: Scope checking on static array struct doesn't kick in

2017-05-09 Thread Stanislav Blinov via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 12:25:29 UTC, Nordlöw wrote: On Tuesday, 9 May 2017 at 11:52:35 UTC, Nordlöw wrote: I've tagged the ref-returning functions (in this case `opSlice`) with `return scope` for my statically allocated array struct at Here's a simpler example https://github.com/nordlow/p

Re: Scope checking on static array struct doesn't kick in

2017-05-09 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 11:52:35 UTC, Nordlöw wrote: I've tagged the ref-returning functions (in this case `opSlice`) with `return scope` for my statically allocated array struct at Here's a simpler example https://github.com/nordlow/phobos-next/blob/cf85f449d24981fbe6269f8096db23282e2fbb65

Scope checking on static array struct doesn't kick in

2017-05-09 Thread Nordlöw via Digitalmars-d-learn
I've tagged the ref-returning functions (in this case `opSlice`) with `return scope` for my statically allocated array struct at https://github.com/nordlow/phobos-next/blob/master/src/arrayn.d but for some reason the scope-checking (via -dip1000) allows both https://github.com/nordlow/phobos-n

Re: Looking for an equivalent to C++ std::getline in D

2017-05-09 Thread k-five via Digitalmars-d-learn
On Monday, 8 May 2017 at 21:37:17 UTC, Ali Çehreli wrote: On 05/06/2017 02:24 AM, Stanislav Blinov wrote: It may D has this philosophy as Perl has: There's more than one way to do it I found more than 5 ways. another way: string[] input = [

Re: Converting a string[] to char**

2017-05-09 Thread David Zhang via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 07:59:19 UTC, Stanislav Blinov wrote: On Tuesday, 9 May 2017 at 07:50:33 UTC, David Zhang wrote: If indeed there is no way to avoid allocation, do the allocations have to remain 'alive' for the duration of the instance? Or can I deallocate immediately afterwards? I c

Re: Converting a string[] to char**

2017-05-09 Thread Stanislav Blinov via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 07:50:33 UTC, David Zhang wrote: If indeed there is no way to avoid allocation, do the allocations have to remain 'alive' for the duration of the instance? Or can I deallocate immediately afterwards? I can't seem to find it in the Vulkan spec. 2.3.1. Object Lifetim

Re: Converting a string[] to char**

2017-05-09 Thread David Zhang via Digitalmars-d-learn
On Tuesday, 9 May 2017 at 05:52:28 UTC, Mike Parker wrote: On Tuesday, 9 May 2017 at 05:38:24 UTC, ag0aep6g wrote: You have to create a new array of pointers. As rikki cattermole has pointed out, you also have to null-terminate the individual strings, and pass the amount of pointers in a sepa