Re: LSP-server for D?

2022-12-06 Thread Per Nordlöw via Digitalmars-d-learn
On Tuesday, 6 December 2022 at 01:48:54 UTC, ryuukk_ wrote: Have you tried this? https://github.com/Pure-D/serve-d/blob/master/editor-emacs.md It should be similar for lsp-mode make sure you provide the proper parameters Ok, thanks.

Re: Easy sockets - don't exist yet?

2022-12-06 Thread Jacob Shtokolov via Digitalmars-d-learn
On Saturday, 3 December 2022 at 11:08:53 UTC, Vincent wrote: Unfortunately even TECHNICALLY stream never was a "range"! It's more like "queue of bytes", where you can never be sure you even get these bytes. A stream is exactly a range, a "range of ranges" if more specifically. All network dev

Re: How ptr arithmitic works??? It doesn't make any sense....

2022-12-06 Thread rempas via Digitalmars-d-learn
On Monday, 5 December 2022 at 22:21:06 UTC, Salih Dincer wrote: Yeah, there is such a thing! I'm sure you'll all like this example: [...] Great example! Thank you my friend!

printf, writeln, writefln

2022-12-06 Thread johannes via Digitalmars-d-learn
//-- the result should be f.i. "the sun is shining" //-- sqlite3_column_text returns a constant char* a \0 delimited c-string printf("%s\n",sqlite3_column_text(res, i)); writeln(sqlite3_column_text(res, i)); writefln("%s",sqlite3_column_text(res, i)); writefln(std.conv.to!string(sqlite3_column_t

Re: printf, writeln, writefln

2022-12-06 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Dec 06, 2022 at 11:07:32PM +, johannes via Digitalmars-d-learn wrote: > //-- the result should be f.i. "the sun is shining" > //-- sqlite3_column_text returns a constant char* a \0 delimited c-string > printf("%s\n",sqlite3_column_text(res, i)); > writeln(sqlite3_column_text(res, i));

Re: printf, writeln, writefln

2022-12-06 Thread ryuukk_ via Digitalmars-d-learn
On Tuesday, 6 December 2022 at 23:41:09 UTC, H. S. Teoh wrote: On Tue, Dec 06, 2022 at 11:07:32PM +, johannes via Digitalmars-d-learn wrote: //-- the result should be f.i. "the sun is shining" //-- sqlite3_column_text returns a constant char* a \0 delimited c-string printf("%s\n",sqlite3_c

Re: printf, writeln, writefln

2022-12-06 Thread Siarhei Siamashka via Digitalmars-d-learn
On Tuesday, 6 December 2022 at 23:07:32 UTC, johannes wrote: //-- the result should be f.i. "the sun is shining" //-- sqlite3_column_text returns a constant char* a \0 delimited c-string printf("%s\n",sqlite3_column_text(res, i)); writeln(sqlite3_column_text(res, i)); writefln("%s",sqlite3_colu

Re: printf, writeln, writefln

2022-12-06 Thread ryuukk_ via Digitalmars-d-learn
On Wednesday, 7 December 2022 at 01:46:21 UTC, Siarhei Siamashka wrote: On Tuesday, 6 December 2022 at 23:07:32 UTC, johannes wrote: //-- the result should be f.i. "the sun is shining" //-- sqlite3_column_text returns a constant char* a \0 delimited c-string printf("%s\n",sqlite3_column_text(r

Re: printf, writeln, writefln

2022-12-06 Thread ag0aep6g via Digitalmars-d-learn
On 07.12.22 01:35, ryuukk_ wrote: On Tuesday, 6 December 2022 at 23:41:09 UTC, H. S. Teoh wrote: [...] In D, strings are not the same as char*.  You should use std.conv.fromStringZ to convert the C char* to a D string. [...] no, you don't "need" to use std conv Here is an alternative that d