Re: Fibers and async io stuff for beginners

2015-04-23 Thread ref2401 via Digitalmars-d-learn
Awesome!

Re: Looking for MQTT client library

2015-04-23 Thread Frank Pagliughi via Digitalmars-d-learn
I got the OK to submit the D library to Eclipse Paho. So, hopefully within the next few weeks there will be a Paho incubator project for the D language client.

Re: Startup files for STM32F4xx

2015-04-23 Thread Jens Bauer via Digitalmars-d-learn
On Thursday, 23 April 2015 at 12:14:59 UTC, Steven Schveighoffer wrote: On 4/23/15 5:54 AM, Jens Bauer wrote: :) When having a PowerPC based Mac, you're living in a land of no support. yikes! time for an upgrade :) :) I'm only staying with my PPC Mac for two reasons: My PCB design

Re: Fibers and async io stuff for beginners

2015-04-23 Thread Ali Çehreli via Digitalmars-d-learn
On 04/23/2015 06:56 AM, ref2401 wrote: I'm intrested in fibers and async io. Could anyone suggest articles, books or tutorials about the subject? Thank you I am working on adding a Fibers chapter to my book. Although it is still a draft and not linked from any other page, I've made it

Re: User input readline || readf

2015-04-23 Thread kerze via Digitalmars-d-learn
hmm the paste is away ?!? here i post my source one more time. [code] import std.stdio; import std.string; struct Human { string name; ushort age; }; void print_human_list(Human[] human_list){ foreach(human; human_list){ writeln(human.name); writeln(human.age);

Re: Fibers and async io stuff for beginners

2015-04-23 Thread Jens Bauer via Digitalmars-d-learn
On Thursday, 23 April 2015 at 14:22:01 UTC, Ali Çehreli wrote: On 04/23/2015 06:56 AM, ref2401 wrote: http://ddili.org/ders/d.en/fibers.html I appreciate any feedback before the book is finally printed sometime before DConf. This is great information. I didn't know anything about Fibers

User input readline || readf

2015-04-23 Thread kerze via Digitalmars-d-learn
Hy, i'm new @ D and i come from python. Sorry for my engish, i understand good, but i write like a cow spanish. I make a little programm to add human's name and age and a function to write out alls humans in the list. Here is the source: http://dpaste.dzfl.pl/0a0da462225d The problem is,

Re: User input readline || readf

2015-04-23 Thread Dennis Ritchie via Digitalmars-d-learn
On Thursday, 23 April 2015 at 17:18:01 UTC, kerze wrote: Hy, i'm new @ D and i come from python. Sorry for my engish, i understand good, but i write like a cow spanish. I make a little programm to add human's name and age and a function to write out alls humans in the list. Here is the

Re: User input readline || readf

2015-04-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/23/15 1:17 PM, kerze wrote: The problem is, it writes instant Name: Age: at the standart output. readf reads the element from the stream, and NOTHING MORE, it leaves the newline on the stream. So the next readf then reads the newline as a string. You can fix this by using readf( %s),

Re: Fibers and async io stuff for beginners

2015-04-23 Thread Chris via Digitalmars-d-learn
On Thursday, 23 April 2015 at 16:57:30 UTC, Jens Bauer wrote: On Thursday, 23 April 2015 at 14:22:01 UTC, Ali Çehreli wrote: On 04/23/2015 06:56 AM, ref2401 wrote: http://ddili.org/ders/d.en/fibers.html I appreciate any feedback before the book is finally printed sometime before DConf.

Re: Fibers and async io stuff for beginners

2015-04-23 Thread Jens Bauer via Digitalmars-d-learn
On Thursday, 23 April 2015 at 19:24:31 UTC, Chris wrote: On Thursday, 23 April 2015 at 16:57:30 UTC, Jens Bauer wrote: 3: Audio mixing and playback (eg. a MOD player for instance). 5: Queueing up a bunch of different jobs; At the moment I'm using threads to implement a speech synthesizer. It

Re: User input readline || readf

2015-04-23 Thread via Digitalmars-d-learn
The paste is still there. readf leaves the \n from pressing enter in stdin, which gets read by the next function that's accessing it. I answered a similiar question in another thread: http://forum.dlang.org/post/jwxfaztgsyzwqpzaj...@forum.dlang.org I see two other mistakes in your code as

Re: User input readline || readf

2015-04-23 Thread kerze via Digitalmars-d-learn
Willkommen in der D Community. ;) So many Thanks @Steven and Jacques, answer's more than a only; do this ;)

Re: User input readline || readf

2015-04-23 Thread Dennis Ritchie via Digitalmars-d-learn
It also works: - import std.conv; import std.stdio; import std.string; struct Human { string name; ushort age; } void print_human_list(Human[] human_list) { foreach(human; human_list) { writeln(human.name); writeln(human.age);

Fibers and async io stuff for beginners

2015-04-23 Thread ref2401 via Digitalmars-d-learn
I'm intrested in fibers and async io. Could anyone suggest articles, books or tutorials about the subject? Thank you

Re: Return data from different types of conditional operation

2015-04-23 Thread John Colvin via Digitalmars-d-learn
On Thursday, 23 April 2015 at 09:48:21 UTC, Dennis Ritchie wrote: Hi, Why the program can not return different types of data from the conditional operator? - import std.stdio; auto foo() { if (true) { return 0; } else return true; } void

Re: Return data from different types of conditional operation

2015-04-23 Thread rumbu via Digitalmars-d-learn
On Thursday, 23 April 2015 at 10:06:45 UTC, John Colvin wrote: On Thursday, 23 April 2015 at 09:48:21 UTC, Dennis Ritchie wrote: Hi, Why the program can not return different types of data from the conditional operator? - import std.stdio; auto foo() { if (true) {

Return data from different types of conditional operation

2015-04-23 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, Why the program can not return different types of data from the conditional operator? - import std.stdio; auto foo() { if (true) { return 0; } else return true; } void main() { writeln(foo); }

Re: Startup files for STM32F4xx

2015-04-23 Thread Jens Bauer via Digitalmars-d-learn
On Thursday, 23 April 2015 at 04:59:47 UTC, Rikki Cattermole wrote: On 23/04/2015 4:53 p.m., Jens Bauer wrote: On Thursday, 23 April 2015 at 04:48:16 UTC, Rikki Cattermole wrote: Ehh, maybe you should setup a e.g. vm of e.g. Linux Mint and use e.g. Github via it. :) When having a PowerPC

Re: Return data from different types of conditional operation

2015-04-23 Thread wobbles via Digitalmars-d-learn
On Thursday, 23 April 2015 at 09:48:21 UTC, Dennis Ritchie wrote: Hi, Why the program can not return different types of data from the conditional operator? - import std.stdio; auto foo() { if (true) { return 0; } else return true; } void

Re: Startup files for STM32F4xx

2015-04-23 Thread Rikki Cattermole via Digitalmars-d-learn
On 23/04/2015 9:54 p.m., Jens Bauer wrote: On Thursday, 23 April 2015 at 04:59:47 UTC, Rikki Cattermole wrote: On 23/04/2015 4:53 p.m., Jens Bauer wrote: On Thursday, 23 April 2015 at 04:48:16 UTC, Rikki Cattermole wrote: Ehh, maybe you should setup a e.g. vm of e.g. Linux Mint and use e.g.

Re: Startup files for STM32F4xx

2015-04-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/23/15 5:54 AM, Jens Bauer wrote: On Thursday, 23 April 2015 at 04:59:47 UTC, Rikki Cattermole wrote: On 23/04/2015 4:53 p.m., Jens Bauer wrote: On Thursday, 23 April 2015 at 04:48:16 UTC, Rikki Cattermole wrote: Ehh, maybe you should setup a e.g. vm of e.g. Linux Mint and use e.g. Github

Re: Return data from different types of conditional operation

2015-04-23 Thread Dennis Ritchie via Digitalmars-d-learn
Thank you all. I did not know before, that this behavior is characteristic of dynamically typed programming languages.

Re: Return data from different types of conditional operation

2015-04-23 Thread biozic via Digitalmars-d-learn
On Thursday, 23 April 2015 at 10:26:09 UTC, rumbu wrote: On Thursday, 23 April 2015 at 10:06:45 UTC, John Colvin wrote: On Thursday, 23 April 2015 at 09:48:21 UTC, Dennis Ritchie wrote: Hi, Why the program can not return different types of data from the conditional operator? - import