Re: Best way to read/write Chinese (GBK/GB18030) files?

2023-03-09 Thread zjh via Digitalmars-d-learn
On Friday, 10 March 2023 at 06:19:38 UTC, zjh wrote: `D language` is too unfriendly for Chinese users! You can't even write `gbk` files.

Re: Best way to read/write Chinese (GBK/GB18030) files?

2023-03-09 Thread zjh via Digitalmars-d-learn
On Friday, 10 March 2023 at 02:48:43 UTC, John Xu wrote: ```d module chinese; import std.stdio : writeln; import std.conv; import std.windows.charset; int main(string[] argv) { auto s1 = "中文";//utf8 字符串 writeln("word:"~ s1); //乱的 writeln("word:" ~ to!string(toMBSz(text(s

How to expand wildchar under dos ?

2023-03-09 Thread John Xu via Digitalmars-d-learn
Under dos, how to get wildchar matched file names? PS E:> dmd a.d PS E:> .\a.exe a.* args=["a.exe", "a.*"] d-glob doesn't function well under windows dos either.

Re: Best way to read/write Chinese (GBK/GB18030) files?

2023-03-09 Thread John Xu via Digitalmars-d-learn
I found this: https://github.com/meatatt/exCode/blob/master/source/excode/package.d There is mention of unicode/GBK conversion, maybe it could be helpful Thanks for quick answers. Now I found I can read both UTF8 and UTF-16LE chinese file: string txt = std.file.read(chineseFile).to!stri

Re: Can nice D code get a bit slow?

2023-03-09 Thread FozzieBear via Digitalmars-d-learn
On Wednesday, 8 March 2023 at 10:49:32 UTC, Markus wrote: btw. As far as I can tell (using the example in the link below), compiled D (using the ldc compiler with -O3) will optimise the call just fine. However, not including the 'final' keyword would not mean the end of the world ;-) ht

Re: dub.sdl bindbc-glfw is returning a deprecation warming. So what do I do now?

2023-03-09 Thread WhatMeWorry via Digitalmars-d-learn
On Thursday, 9 March 2023 at 06:36:18 UTC, IchorDev wrote: On Thursday, 9 March 2023 at 00:21:02 UTC, WhatMeWorry wrote: [...] Sorry about that. Try updating to bindbc-glfw 1.0.2, should be fixed now. If you see any other deprecation warnings from BindBC bindings you can silence them with `-

Re: help: Unresolvable dependencies to package openssl

2023-03-09 Thread mw via Digitalmars-d-learn
On Thursday, 9 March 2023 at 01:22:08 UTC, Steven Schveighoffer wrote: This is a known limitation -- dub builds the selections file based on *all* configurations in the file. If you have conflicting ones, it will not know what to pick. However, if you manually construct the selections file,

Re: DlangUI Layout Justification

2023-03-09 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 9 March 2023 at 14:39:06 UTC, ryuukk_ wrote: On Thursday, 9 March 2023 at 10:11:04 UTC, Ron Tarrant wrote: Has anyone else been using D to develop for Android? If so, have you documented your process/GUI toolkit choices and would you be willing to share with me? Adam has somethi

Re: DlangUI Layout Justification

2023-03-09 Thread ryuukk_ via Digitalmars-d-learn
On Thursday, 9 March 2023 at 10:11:04 UTC, Ron Tarrant wrote: Has anyone else been using D to develop for Android? If so, have you documented your process/GUI toolkit choices and would you be willing to share with me? Adam has something for Android: https://github.com/adamdruppe/d_android

Re: DlangUI Layout Justification

2023-03-09 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 9 March 2023 at 10:51:31 UTC, Ron Tarrant wrote: Another question... I found LinkButton in the API, but I don't see how/where to give it a URL to go to. Anyone know? Okay, so far I've got Platform.openURL(), but no idea how to use it. Pass it a string, yes, I got that part, but

Re: Can nice D code get a bit slow?

2023-03-09 Thread user1234 via Digitalmars-d-learn
On Wednesday, 8 March 2023 at 12:46:53 UTC, Hipreme wrote: On Wednesday, 8 March 2023 at 10:49:32 UTC, Markus wrote: Hi, sorry for the broad and vague question. I have read in some reddit post about benchmarks, that some code didn't use the final keyword on methods in a sense that final would m

Re: DlangUI Layout Justification

2023-03-09 Thread Ron Tarrant via Digitalmars-d-learn
Another question... I found LinkButton in the API, but I don't see how/where to give it a URL to go to. Anyone know?

Re: DlangUI Layout Justification

2023-03-09 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 9 March 2023 at 10:11:04 UTC, Ron Tarrant wrote: Is there a way to right-justify widgets in a DlangUI Layout? Found it! (In Example 1 [duh]). Still hoping to hear back from someone about the other question.

Re: Can nice D code get a bit slow?

2023-03-09 Thread FozzieBear via Digitalmars-d-learn
On Thursday, 9 March 2023 at 10:05:35 UTC, FozzieBear wrote: .. But that assumes you even know how long 7 nanoseconds are .. cause I don't. Well, it turns out, that light takes about a nanosecond to travel 1 foot. So that means, the performance impact from using a virutal call, would be eq

DlangUI Layout Justification

2023-03-09 Thread Ron Tarrant via Digitalmars-d-learn
Hi all, It's been a while since I've been on this forum. Hope everyone is doing well and have survived the pandemic. Anyway, a question... Is there a way to right-justify widgets in a DlangUI Layout? I'm asking because I've spent the last six months learning to build Android apps with the Go

Re: Can nice D code get a bit slow?

2023-03-09 Thread FozzieBear via Digitalmars-d-learn
On Wednesday, 8 March 2023 at 10:49:32 UTC, Markus wrote: Hi, sorry for the broad and vague question. I have read in some reddit post about benchmarks, that some code didn't use the final keyword on methods in a sense that final would make it faster, I believe. I thought, without any D knowle