Re: Docs generation example

2020-10-10 Thread Zekereth via Digitalmars-d-learn
On Saturday, 10 October 2020 at 02:07:02 UTC, Виталий Фадеев wrote: Wanted! Docs generation example. I have dub project, sources/*.d. I want html-index with all classes/functions. Is exists simple, hi-level, one-line command line solution ? The more official way is: dub build --build=docs

Re: Blog Post #76: Nodes and Noodles, Part II

2019-10-06 Thread Zekereth via Digitalmars-d-learn
On Friday, 4 October 2019 at 11:36:52 UTC, Ron Tarrant wrote: Here's the second instalment of the Nodes-n-noodles series wherein noodle drawing on a DrawingArea is now complete. You can find it here: http://localhost:4000/2019/10/04/0076-cairo-xi-noodles-and-mouse-clicks.html Here's the

Re: Blog Post #69: TextView and TextBuffer Basics

2019-09-10 Thread Zekereth via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 08:29:59 UTC, Ron Tarrant wrote: This morning's discussion covers the basic workings and relationship between the TextView and TextBuffer widgets. Here's the link: https://gtkdcoding.com/2019/09/10/0069-textview-and-textbuffer.html Yes, thank you very much.

Re: How to learn Phobos,Phbos hard to used for me.

2019-08-30 Thread Zekereth via Digitalmars-d-learn
On Wednesday, 28 August 2019 at 11:34:27 UTC, lili wrote: Hi: Masters who can write a book for Phbos, the dlang doc not friendly to beginner. Have you seen this? http://ddili.org/ders/d.en/index.html It helped me a lot in understanding ranges. Though there is nothing about containers

Re: How to pause terminal in D on Linux?

2016-07-23 Thread Zekereth via Digitalmars-d-learn
On Saturday, 23 July 2016 at 19:08:00 UTC, WhatMeWorry wrote: What I thought would be trivial is becoming a nightmare. Can anybody set me straight. Thanks in advance. [...] Use the getchar() function. void pause(const string msg = "Press enter/return to continue...") { write(msg);

Re: How can you call a stored function in an AA with proper number of arguments converted to the proper type?

2016-07-12 Thread Zekereth via Digitalmars-d-learn
On Tuesday, 12 July 2016 at 08:34:03 UTC, Kagamin wrote: Store a wrapper instead of the actual function: void wrapper(alias F)(string[] args) { (convert args to F arguments) and invoke } cmd.func = !someFunc; string[] args; cmd.func(args); Thanks that is clever. Never would have thought of

How can you call a stored function in an AA with proper number of arguments converted to the proper type?

2016-07-11 Thread Zekereth via Digitalmars-d-learn
Here's the basic code I'm playing with: struct MyCmd { Variant func; // Has other members. } MyCmd[string] functions_; void addCommand(T)(const string name, T func) { MyCmd cmd; cmd.func = Variant(func); functions_[name] = cmd; } void process(string[]

Re: Get current date and time with std.datetime

2016-07-01 Thread Zekereth via Digitalmars-d-learn
On Thursday, 30 June 2016 at 21:18:22 UTC, Luke Picardo wrote: Why is it so hard to simply get the current date and time formatted properly in a string? There are no examples of this in your documentation yet this is probably one of the most used cases. To get the current time, use

Re: Using -J with dub

2016-04-16 Thread Zekereth via Digitalmars-d-learn
On Saturday, 16 April 2016 at 20:57:10 UTC, Bauss wrote: Is there a way to achieve using -J through dub, preferable through dub.json I can't seem to find anything through the dub.json docs on how to pass regular dmd flags. For just -J option use stringImportPaths "". For other commands use

Re: Why is Linux the only OS in version identifier list that has a lowercase name?

2016-04-11 Thread Zekereth via Digitalmars-d-learn
On Tuesday, 12 April 2016 at 01:32:02 UTC, Brian Schott wrote: On Monday, 11 April 2016 at 23:01:08 UTC, marcpmichel wrote: Is it because Linux is not an OS ? :p I gnu somebody would bring that up. /sigh so did I.

Re: Why is Linux the only OS in version identifier list that has a lowercase name?

2016-04-10 Thread Zekereth via Digitalmars-d-learn
On Monday, 11 April 2016 at 01:15:27 UTC, Ali Çehreli wrote: As a workaround, you can set version to Linux yourself: version (linux) { version = Linux; } void main() { version (Linux) { import std.stdio; writeln("Linux worked!"); } } That's interesting that will

Re: Why is Linux the only OS in version identifier list that has a lowercase name?

2016-04-10 Thread Zekereth via Digitalmars-d-learn
On Monday, 11 April 2016 at 00:51:19 UTC, Mike Parker wrote: It's an artifact of history. When this was first introduced, Walter's intent was to match the casing used in gcc preprocessor definitions. Since that time, we've standardized on capitalization for everything, but 'linux' lives on. I

Why is Linux the only OS in version identifier list that has a lowercase name?

2016-04-10 Thread Zekereth via Digitalmars-d-learn
So I was just testing some code and couldn't figure out why it wasn't working. My version block looked like this: version(Linux) { ... } Looking at the list(unless I'm missing something) Linux is the only OS that is lowercase. I'm guessing most people use Posix instead and never encounter

Re: Duration at runtime

2016-02-18 Thread Zekereth via Digitalmars-d-learn
On Friday, 19 February 2016 at 04:21:43 UTC, Zekereth wrote: On Friday, 19 February 2016 at 04:16:23 UTC, Adam D. Ruppe wrote: On Friday, 19 February 2016 at 04:08:02 UTC, Zekereth wrote: How is seconds able to be read at compile time but unitType cannot? "seconds" is a literal value that

Re: Duration at runtime

2016-02-18 Thread Zekereth via Digitalmars-d-learn
On Friday, 19 February 2016 at 04:16:23 UTC, Adam D. Ruppe wrote: On Friday, 19 February 2016 at 04:08:02 UTC, Zekereth wrote: How is seconds able to be read at compile time but unitType cannot? "seconds" is a literal value that the compiler knows about. unitType is a variable that might

Duration at runtime

2016-02-18 Thread Zekereth via Digitalmars-d-learn
I'm confused by the following: import std.stdio; import std.datetime; void main() { string unitType = "seconds"; auto seconds = 1; // auto myDur = dur!(unitType)(seconds); // Error unitType can't be read at compile time. auto myDur = dur!("seconds")(seconds); //

Can you add a remote repository to DUB?

2015-07-17 Thread Zekereth via Digitalmars-d-learn
All I can find is add-local. Thanks!

Re: Will D have a standard cross platform GUI toolkit?

2015-02-26 Thread Zekereth via Digitalmars-d-learn
On Thursday, 26 February 2015 at 18:20:12 UTC, Rinzler wrote: Hello, I was wondering if D will have a standard cross platform GUI toolkit. I think that any modern language should provide a cross-platform GUI toolkit. I know that there are some GUI toolkits, but are there cross-platform?