Re: File Input

2017-05-08 Thread JV via Digitalmars-d-learn
On Sunday, 7 May 2017 at 16:40:50 UTC, k-five wrote: On Sunday, 7 May 2017 at 15:59:25 UTC, JV wrote: [...] [...] -- You have the right for confusing :) there is many read and write names. But I assumed you are familiar w

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

2017-05-08 Thread k-five via Digitalmars-d-learn
On Sunday, 7 May 2017 at 20:50:10 UTC, Patrick Schluter wrote: On Sunday, 7 May 2017 at 13:16:16 UTC, bachmeier wrote: On Sunday, 7 May 2017 at 10:33:25 UTC, k-five wrote: --- When I want to learn to code, I asked in some forums about it, an

Re: File Input

2017-05-08 Thread k-five via Digitalmars-d-learn
On Monday, 8 May 2017 at 08:54:50 UTC, JV wrote: On Sunday, 7 May 2017 at 16:40:50 UTC, k-five wrote: On Sunday, 7 May 2017 at 15:59:25 UTC, JV wrote: --- Do not worry. Your request is not rude. I give you a better tool. I finished to collect so

Re: File Input

2017-05-08 Thread JV via Digitalmars-d-learn
On Monday, 8 May 2017 at 09:26:48 UTC, k-five wrote: On Monday, 8 May 2017 at 08:54:50 UTC, JV wrote: [...] --- Do not worry. Your request is not rude. I give you a better tool. I finished to collect some examples in D and in a few days I will

Re: File Input

2017-05-08 Thread k-five via Digitalmars-d-learn
On Monday, 8 May 2017 at 10:22:53 UTC, JV wrote: On Monday, 8 May 2017 at 09:26:48 UTC, k-five wrote: On Monday, 8 May 2017 at 08:54:50 UTC, JV wrote: --- If I continue to learn D I will do but there is no guarantee and it got ready :) https://g

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

2017-05-08 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
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 ranked 23 with a 1.38% share. The so Tiobe is a "hoax". Stack overflow counts for alternative languages: "swift": 146,374 "scala": 65,594 "go": 22,212 "

Re: Why does this compile (method in class without return type)

2017-05-08 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-05-03 14:50, Adam D. Ruppe wrote: No accident there, the spec says any storage class will do: http://dlang.org/spec/function.html#auto-functions "An auto function is declared without a return type. If it does not already have a storage class, use the auto storage class. " I see. -- /

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

2017-05-08 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
Here is another metric, number of star the main compiler has on github: Chapel: 437 Coq: 618 Ocaml: 1,258 Dmd: 1,574 Haxe: 1,865 Nim: 3,598 Crystal: 8,064 Scala: 8,158 Julia: 8,569 Rust: 21,684 TypeScript: 21,748 Go: 27,702

Re: get vtable size

2017-05-08 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-05-07 06:01, Mike B Johnson wrote: how many elements(virtual functions) are in the __vptr? I guess you can use __traits(allMembers) and __traits(isVirtualMethod) [1]. [1] http://dlang.org/spec/traits.html -- /Jacob Carlborg

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

2017-05-08 Thread Daniel N via Digitalmars-d-learn
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 ranked 23 with a 1.38% share. The so Tiobe is a "hoax". Stack overflow counts for alte

Re: Error writing file a *.obj

2017-05-08 Thread dummy via Digitalmars-d-learn
On Sunday, 7 May 2017 at 14:01:32 UTC, dummy wrote: Hi :) - OS: Winodws 10 Pro KN - DMD: 2.073.2(ofcourse, i tried dmd of 2.074.x version. but same result) When i build some application with dub, i got this error: -- du

Re: Error writing file a *.obj

2017-05-08 Thread bachmeier via Digitalmars-d-learn
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 there: http://forum.rejectedsoftware.com/

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

2017-05-08 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Monday, 8 May 2017 at 11:41:02 UTC, Daniel N wrote: Stack-Overflow usage is clearly not representative of language usage. 1) Our forum is flourishing, why would any D developer use SO? 2) The number of questions is directly proportional with the difficulty of the language.(D is quite easy to

Re: get vtable size

2017-05-08 Thread Basile B. via Digitalmars-d-learn
On Sunday, 7 May 2017 at 04:01:43 UTC, Mike B Johnson wrote: how many elements(virtual functions) are in the __vptr? You don't need the size. The index you get with __traits(virtualIndex) is always valid. (https://dlang.org/spec/traits.html#getVirtualIndex) However as an exercise you can st

Re: Error writing file a *.obj

2017-05-08 Thread dummy via Digitalmars-d-learn
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 there: http://forum.rejectedsoftware.com/ thank you

Re: Productive vibe.d dev environment (IDE, debugger) on Linux?

2017-05-08 Thread crimaniak via Digitalmars-d-learn
On Wednesday, 3 May 2017 at 17:43:07 UTC, kinke wrote: can anyone recommend a more or less production-ready dev environment for vibe.d on Linux? I'm evaluating vibe.d against Phoenix (Elixir/Erlang) for a new project. Today I gave Visual Studio Code a quick shot (with LDC 1.1.1 and DMD 2.071/7

Re: Deprecation: foo.bar is not visible from module traits

2017-05-08 Thread Ali Çehreli via Digitalmars-d-learn
Known issue: https://issues.dlang.org/buglist.cgi?quicksearch=getSymbolsByUDA Ali

Structure of platform specific vs non platform specific code

2017-05-08 Thread Igor via Digitalmars-d-learn
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 it uses modules and I am wond

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

2017-05-08 Thread Ali Çehreli via Digitalmars-d-learn
On 05/06/2017 02:24 AM, Stanislav Blinov wrote: > auto input = args[1].splitter('/').filter!((string s) { return !s.empty; > })(); > > or a template lambda: > > auto input = arga[1].splitter('/').filter!((s) => !s.empty)(); Not necessarily better but worth mentioning: import std.functional

Re: Error writing file a *.obj

2017-05-08 Thread dummy via Digitalmars-d-learn
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 there: http://forum.rejectedsoftware.com/ Oh, i solv

Converting a string[] to char**

2017-05-08 Thread David Zhang via Digitalmars-d-learn
Hi, I'm playing around with Vulkan, and part of its initialization code calls for an array of strings as char**. I've tried casting directly (cast(char**)) and breaking it down into an array of char*s (char*[]) before getting the pointer to its first element (&a[0]). It provides the correct t

Re: Converting a string[] to char**

2017-05-08 Thread rikki cattermole via Digitalmars-d-learn
On 09/05/2017 5:22 AM, David Zhang wrote: Hi, I'm playing around with Vulkan, and part of its initialization code calls for an array of strings as char**. I've tried casting directly (cast(char**)) and breaking it down into an array of char*s (char*[]) before getting the pointer to its first ele

Re: Converting a string[] to char**

2017-05-08 Thread ag0aep6g via Digitalmars-d-learn
On 05/09/2017 06:22 AM, David Zhang wrote: I'm playing around with Vulkan, and part of its initialization code calls for an array of strings as char**. I've tried casting directly (cast(char**)) and breaking it down into an array of char*s (char*[]) before getting the pointer to its first element

Re: Converting a string[] to char**

2017-05-08 Thread Mike Parker via Digitalmars-d-learn
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 separate parameter. import std.algorithm.iteration: map;

Re: Error writing file a *.obj

2017-05-08 Thread I Lindström 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