Re: Using D for Raspberry Pi expirements

2019-09-25 Thread aberba via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 23:56:45 UTC, aberba wrote: I'm looking for resources on using D for basic Raspberry Pi programming...stuff like turning on and off an LED light. I believe it requires being able to call the Raspberry OS core APIs from D as available in Python. Just found

Re: Using D for Raspberry Pi expirements

2019-09-25 Thread Mike Franklin via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 23:56:45 UTC, aberba wrote: I'm looking for resources on using D for basic Raspberry Pi programming...stuff like turning on and off an LED light. I believe it requires being able to call the Raspberry OS core APIs from D as available in Python. Anyone here

Using D for Raspberry Pi expirements

2019-09-25 Thread aberba via Digitalmars-d-learn
I'm looking for resources on using D for basic Raspberry Pi programming...stuff like turning on and off an LED light. I believe it requires being able to call the Raspberry OS core APIs from D as available in Python. Anyone here tried something like that using D?

Re: Difference between slice[] and slice

2019-09-25 Thread ag0aep6g via Digitalmars-d-learn
On 25.09.19 22:36, WhatMeWorry wrote: On Wednesday, 25 September 2019 at 19:25:06 UTC, Ali Çehreli wrote: On 09/25/2019 12:06 PM, WhatMeWorry wrote: [...] > In short, is there anytime that one would want to use "slice[] = > something" syntax?I That changes element values. Ok.  But which

Re: Difference between slice[] and slice

2019-09-25 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 20:36:47 UTC, WhatMeWorry wrote: Ok. But which element(s)? In my specific case, I was using []. Is waste[] = waste[0..$-1]; even semantically meaningful? Because the LDC compiler had no problem compiling it. `waste[]` is just shorthand for

Re: Difference between slice[] and slice

2019-09-25 Thread WhatMeWorry via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 19:25:06 UTC, Ali Çehreli wrote: On 09/25/2019 12:06 PM, WhatMeWorry wrote: > I was > assuming that [] meant "the entirety" of the array. Assuming we're talking about D slices, Yes. (It could be a user-defined type with surprisingly different semantics.) >

Re: Inspecting __traits(isDeprecated) and deprecation warnings

2019-09-25 Thread Boris Carvajal via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 14:20:00 UTC, Anonymouse wrote: I added some deprecations in my project and am going through my templates trying to silence the warnings that suddenly popped up. This template works, but it triggers deprecation warnings when I am actively trying to avoid

Re: Difference between slice[] and slice

2019-09-25 Thread Ali Çehreli via Digitalmars-d-learn
On 09/25/2019 12:06 PM, WhatMeWorry wrote: > I was > assuming that [] meant "the entirety" of the array. Assuming we're talking about D slices, Yes. (It could be a user-defined type with surprisingly different semantics.) > In short, is there anytime that one would want to use "slice[] = >

Difference between slice[] and slice

2019-09-25 Thread WhatMeWorry via Digitalmars-d-learn
Just got through debugging a line of code which uses dynamic array. It boiled to to my use of []. How should I "D think" about slice[]? The run time error seems to say the the length of [] is zero. I was assuming that [] meant "the entirety" of the array. In short, is there anytime

Re: How to get the address of an instance of a class

2019-09-25 Thread Tobias Pankrath via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 17:32:25 UTC, dokutoku wrote: I wrote the following code to get the address of a class instance, but it doesn't work. Please let me know if there is a way to write it to work properly. private import std; ``` class C { C* this_pointer() {

How to get the address of an instance of a class

2019-09-25 Thread dokutoku via Digitalmars-d-learn
I wrote the following code to get the address of a class instance, but it doesn't work. Please let me know if there is a way to write it to work properly. private import std; ``` class C { C* this_pointer() { return this; } } void main() { C Z =

Re: Looking for a Simple Doubly Linked List Implementation

2019-09-25 Thread Ron Tarrant via Digitalmars-d-learn
On Monday, 23 September 2019 at 22:40:41 UTC, Ali Çehreli wrote: So, what was it then? Append to an array, sort it, and be happy? :) Ali Hi, Ali, It turns out that the GTK Notebook has its own built-in mechanism for tracking tabs. Two things got me going down the wrong road on this: 1)

Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-25 Thread Ron Tarrant via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 13:52:48 UTC, bioinfornatics wrote: I think I misunderstood your need but are lo looking for dub tool with its repository https://code.dlang.org/ I don't think so, but I could be wrong. I tried reading up on dub, but got lost in the docs, so I really don't

Re: Inspecting __traits(isDeprecated) and deprecation warnings

2019-09-25 Thread Anonymouse via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 05:57:19 UTC, Tobias Pankrath wrote: Does your code work or does it not? I don't seem to unterstand neither what the question here is nor what the desired result is. Is the problem that the static reflections triggers the deprecation warning? I added some

Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-25 Thread bioinfornatics via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant wrote: Hi y'all, I've been Googling how to do this, but coming up with nothing definitive. Are there any articles for how to do this for: Windows? Linux? other UNIX-alike OSs? I think I misunderstood your need but are lo looking

Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-25 Thread Ron Tarrant via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 12:32:58 UTC, a11e99z wrote: so u need installers/installation program https://en.wikipedia.org/wiki/List_of_installation_software well, a long-long time ago I used InstallShield & Wix Toolset for Windows only. I'll check those out. Thanks.

Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-25 Thread a11e99z via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 12:04:16 UTC, Ron Tarrant wrote: On Wednesday, 25 September 2019 at 11:50:58 UTC, a11e99z wrote: On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant wrote: Hi y'all, What I'm looking for is a system for bundling dlang apps and their dependencies

Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-25 Thread Ron Tarrant via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 11:50:58 UTC, a11e99z wrote: On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant wrote: Hi y'all, I've been Googling how to do this, but coming up with nothing definitive. Are there any articles for how to do this for: Windows? Linux? other

Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-25 Thread a11e99z via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant wrote: Hi y'all, I've been Googling how to do this, but coming up with nothing definitive. Are there any articles for how to do this for: Windows? Linux? other UNIX-alike OSs? UPX? https://en.wikipedia.org/wiki/UPX

Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-25 Thread Ron Tarrant via Digitalmars-d-learn
Hi y'all, I've been Googling how to do this, but coming up with nothing definitive. Are there any articles for how to do this for: Windows? Linux? other UNIX-alike OSs?

Re: Inspecting __traits(isDeprecated) and deprecation warnings

2019-09-25 Thread Tobias Pankrath via Digitalmars-d-learn
On Tuesday, 24 September 2019 at 17:01:46 UTC, Anonymouse wrote: I want to write a piece of code that reflects on the names of members of a passed struct, where some are depreacted. https://run.dlang.io/is/P9EtRG struct Foo { string s; int ii; bool bbb; deprecated("Use `s`")