Re: Any full feature xml library available?

2019-05-03 Thread Domain via Digitalmars-d-learn
On Friday, 3 May 2019 at 21:07:29 UTC, H. S. Teoh wrote: On Fri, May 03, 2019 at 09:56:56PM +0100, Russel Winder via Digitalmars-d-learn wrote: On Thu, 2019-05-02 at 09:28 -0700, H. S. Teoh via Digitalmars-d-learn wrote: > On Thu, May 02, 2019 at 05:23:29PM +0100, Russel Winder via >

Re: Any full feature xml library available?

2019-05-01 Thread Domain via Digitalmars-d-learn
On Wednesday, 1 May 2019 at 13:57:04 UTC, bachmeier wrote: On Wednesday, 1 May 2019 at 13:54:08 UTC, Domain wrote: I need a xml library which support document entity or xinclude. The xml may like this: ]> http://www.w3.org/2001/XInclude;> Have you looked at this?

Any full feature xml library available?

2019-05-01 Thread Domain via Digitalmars-d-learn
I need a xml library which support document entity or xinclude. The xml may like this: ]> http://www.w3.org/2001/XInclude;>

Re: How can I build dynamic library with ldc in termux?

2019-03-03 Thread Domain via Digitalmars-d-learn
On Sunday, 3 March 2019 at 01:51:49 UTC, Domain wrote: [...] Sorry, my mistake. I can build dynamic library now.

Re: How can I build dynamic library with ldc in termux?

2019-03-03 Thread Domain via Digitalmars-d-learn
On Sunday, 3 March 2019 at 12:25:28 UTC, kinke wrote: On Sunday, 3 March 2019 at 01:47:50 UTC, Domain wrote: /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lphobos2-ldc-shared /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find

Re: How can I build dynamic library with ldc in termux?

2019-03-02 Thread Domain via Digitalmars-d-learn
On Sunday, 3 March 2019 at 01:47:50 UTC, Domain wrote: /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lphobos2-ldc-shared /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -ldruntime-ldc-shared Any dub config example? ~> dub build Dynamic

How can I build dynamic library with ldc in termux?

2019-03-02 Thread Domain via Digitalmars-d-learn
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lphobos2-ldc-shared /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -ldruntime-ldc-shared

Nested sub packages in dub

2018-12-02 Thread Domain via Digitalmars-d-learn
How to do that?

How to get all modules in a package at CT?

2018-11-24 Thread Domain via Digitalmars-d-learn
I have a package named command, and many modules inside it, such as command.build, command.pack, command.help... I want to get all these modules at compile time so that I know what command is available.

Re: subsystem:windows and writeln

2018-11-16 Thread Domain via Digitalmars-d-learn
On Friday, 16 November 2018 at 17:46:20 UTC, Adam D. Ruppe wrote: On Friday, 16 November 2018 at 17:36:01 UTC, Domain wrote: I think this is unacceptable. Why? You are asking it to write to a file that doesn't exist... you probably shouldn't be doing that... But I cannot control the 3rd

subsystem:windows and writeln

2018-11-16 Thread Domain via Digitalmars-d-learn
When I link the app with /subsystem:windows, and all writeln and writefln will cause a enforcement failed (stdio.d:2889). I think this is unacceptable.

Re: Alias this and opDispatch override

2018-09-06 Thread Domain via Digitalmars-d-learn
On Friday, 7 September 2018 at 02:22:58 UTC, Domain wrote: The following code fail to compile: enum KeyMod : int { LCtrl = 1 << 0, RCtrl = 1 << 1, Ctrl = LCtrl | RCtrl, } struct Flags(E) { public: BitFlags!(E, Yes.unsafe) flags; alias flags this; bool

Alias this and opDispatch override

2018-09-06 Thread Domain via Digitalmars-d-learn
The following code fail to compile: enum KeyMod : int { LCtrl = 1 << 0, RCtrl = 1 << 1, Ctrl = LCtrl | RCtrl, } struct Flags(E) { public: BitFlags!(E, Yes.unsafe) flags; alias flags this; bool opDispatch(string name)() const if (__traits(hasMember, E, name))

Re: Why toUTF8 not accept wchar[] as argument?

2018-04-02 Thread Domain via Digitalmars-d-learn
On Tuesday, 3 April 2018 at 02:31:15 UTC, Uknown wrote: On Tuesday, 3 April 2018 at 02:24:08 UTC, Domain wrote: wchar[10] buffer; toUTF8(buffer); Error: template `std.utf.toUTF8` cannot deduce function from argument types `!()(wchar[10])`, candidates are:

Why toUTF8 not accept wchar[] as argument?

2018-04-02 Thread Domain via Digitalmars-d-learn
wchar[10] buffer; toUTF8(buffer); Error: template `std.utf.toUTF8` cannot deduce function from argument types `!()(wchar[10])`, candidates are: /dlang/dmd/linux/bin64/../../src/phobos/std/utf.d(2713): `std.utf.toUTF8(S)(S s) if (isInputRange!S && !isInfinite!S &&

Re: How to split a string to a 2D array

2018-02-24 Thread Domain via Digitalmars-d-learn
On Saturday, 24 February 2018 at 08:59:46 UTC, Domain wrote: On Saturday, 24 February 2018 at 07:51:27 UTC, Domain wrote: [...] And why this not compile: rows.each!(a => data ~= a.split(",").map!(b => b.strip).padRight("", 2)); Error: cannot deduce function from argument types

Re: How to split a string to a 2D array

2018-02-24 Thread Domain via Digitalmars-d-learn
On Saturday, 24 February 2018 at 07:51:27 UTC, Domain wrote: I want to convert a string like " a,b1, 23 " to a 2D array like: [["a", "b"], ["1", "2"], ["3", "" ]] auto html = " a,b1, 23 "; auto rows = html.strip.chomp("").split(""); string[][] data; rows.each!(a => data ~= a.split(","));

How to split a string to a 2D array

2018-02-23 Thread Domain via Digitalmars-d-learn
I want to convert a string like " a,b1, 23 " to a 2D array like: [["a", "b"], ["1", "2"], ["3", "" ]] auto html = " a,b1, 23 "; auto rows = html.strip.chomp("").split(""); string[][] data; rows.each!(a => data ~= a.split(",")); string[][] result = data.map!(a => a.padRight("",

No error message in DMD 2.078.2

2018-02-12 Thread Domain via Digitalmars-d-learn
module main; void main () { writeln("Hello"); } Of course, this won't compile, but error message is confused: C:\Git\hello\source>dmd app.d app.d(5): Error: object.Error@(0): Access Violation 0x0065445A 0x006548FE 0x0064DBD3 0x004B0B90 0x004B8A02 0x00594813 0x005797E2

Re: std.file and non-English filename in Windows

2018-01-01 Thread Domain via Digitalmars-d-learn
On Monday, 1 January 2018 at 16:13:06 UTC, Domain wrote: On Monday, 1 January 2018 at 12:33:27 UTC, John Chapman wrote: On Sunday, 31 December 2017 at 18:21:29 UTC, Domain wrote: In Windows, exists, rename, copy will report file not exists when you input non-English filename, such as Chinese

Re: std.file and non-English filename in Windows

2018-01-01 Thread Domain via Digitalmars-d-learn
On Monday, 1 January 2018 at 12:33:27 UTC, John Chapman wrote: On Sunday, 31 December 2017 at 18:21:29 UTC, Domain wrote: In Windows, exists, rename, copy will report file not exists when you input non-English filename, such as Chinese 中文.txt Works for me. I created a file with the name

std.file and non-English filename in Windows

2017-12-31 Thread Domain via Digitalmars-d-learn
In Windows, exists, rename, copy will report file not exists when you input non-English filename, such as Chinese 中文.txt

Re: debugging in vs code on Windows

2017-10-17 Thread Domain via Digitalmars-d-learn
On Tuesday, 17 October 2017 at 08:43:33 UTC, Domain wrote: On Tuesday, 17 October 2017 at 03:10:52 UTC, Dmitry wrote: On Tuesday, 17 October 2017 at 02:32:49 UTC, Domain wrote: Can you share your tasks.json and launch.json? tasks.json - I don't have this file. launch.json: { "version":

Re: debugging in vs code on Windows

2017-10-17 Thread Domain via Digitalmars-d-learn
On Tuesday, 17 October 2017 at 03:10:52 UTC, Dmitry wrote: On Tuesday, 17 October 2017 at 02:32:49 UTC, Domain wrote: Can you share your tasks.json and launch.json? tasks.json - I don't have this file. launch.json: { "version": "0.2.0", "configurations": [ {

Re: debugging in vs code on Windows

2017-10-16 Thread Domain via Digitalmars-d-learn
On Sunday, 15 October 2017 at 13:54:49 UTC, Dmitry wrote: On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote: Has anyone been able to debug in VS code on Windows? What am I doing wrong? Yep, it work for me. How do you start debugging? I noticed that the bottom button (small bug) at

Re: How to overload with enum type?

2017-10-15 Thread Domain via Digitalmars-d-learn
On Sunday, 15 October 2017 at 08:47:42 UTC, Domain wrote: void f(int i) { writeln("i"); } void f(E)(E e) if (is(E == enum)) { writeln("e"); } enum E { A } E e = E.A; f(e);// output i How can I overload with enum type? I know I can do that with this: void f(T)(T i) if (is(T ==

How to overload with enum type?

2017-10-15 Thread Domain via Digitalmars-d-learn
void f(int i) { writeln("i"); } void f(E)(E e) if (is(E == enum)) { writeln("e"); } enum E { A } E e = E.A; f(e);// output i How can I overload with enum type?

Re: sharedLog between dll

2017-08-01 Thread Domain via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 09:06:39 UTC, rikki cattermole wrote: On 01/08/2017 9:28 AM, Domain wrote: I want to redirect the sharedLog to my logger in one dll, and all dlls will use the new one. What should I do? sharedLog = new MyLogger(); // this will not change the logger in other dll

sharedLog between dll

2017-08-01 Thread Domain via Digitalmars-d-learn
I want to redirect the sharedLog to my logger in one dll, and all dlls will use the new one. What should I do? sharedLog = new MyLogger(); // this will not change the logger in other dll

Re: mixin template, extern(C/Windows) and mangled name

2017-07-31 Thread Domain via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 03:30:08 UTC, Adam D. Ruppe wrote: On Tuesday, 1 August 2017 at 03:08:30 UTC, Domain wrote: And I can see SimpleDllMain in core.sys.windows.dll, the mangled name is correct: DllMain main, DllMain, and WinMain are special cased... for yours, I think you'll have to

mixin template, extern(C/Windows) and mangled name

2017-07-31 Thread Domain via Digitalmars-d-learn
I known there is a bug with extern(C) in mixin template: https://issues.dlang.org/show_bug.cgi?id=12575 And I can see SimpleDllMain in core.sys.windows.dll, the mangled name is correct: DllMain But my mixin template has wrong mangled name: mixin template GetMetaData() { extern(Windows)

Re: Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-22 Thread Domain via Digitalmars-d-learn
On Friday, 21 July 2017 at 19:05:00 UTC, Jonathan M Davis wrote: On Friday, July 21, 2017 15:33:45 Domain via Digitalmars-d-learn wrote: After upgrade dmd to latest 2.075.0, my project no longer build: zero.lib(core_cde_4a4f.obj) : error LNK2001: unresolved external symbol _D3std8d

Re: Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-22 Thread Domain via Digitalmars-d-learn
On Friday, 21 July 2017 at 19:05:00 UTC, Jonathan M Davis wrote: On Friday, July 21, 2017 15:33:45 Domain via Digitalmars-d-learn wrote: After upgrade dmd to latest 2.075.0, my project no longer build: zero.lib(core_cde_4a4f.obj) : error LNK2001: unresolved external symbol _D3std8d

Re: Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-21 Thread Domain via Digitalmars-d-learn
On Friday, 21 July 2017 at 19:05:00 UTC, Jonathan M Davis wrote: On Friday, July 21, 2017 15:33:45 Domain via Digitalmars-d-learn wrote: After upgrade dmd to latest 2.075.0, my project no longer build: zero.lib(core_cde_4a4f.obj) : error LNK2001: unresolved external symbol _D3std8d

Cannot find std.datetime when linking after upgrade to 2.075.0

2017-07-21 Thread Domain via Digitalmars-d-learn
After upgrade dmd to latest 2.075.0, my project no longer build: zero.lib(core_cde_4a4f.obj) : error LNK2001: unresolved external symbol _D3std8d atetime9LocalTime6opCallFNaNbNeZyC3std8datetime9LocalTime and many more. All about std.datetime.

Re: How to debug in vscode with mago-mi?

2017-07-20 Thread Domain via Digitalmars-d-learn
On Thursday, 20 July 2017 at 15:31:55 UTC, WebFreak001 wrote: On Monday, 17 July 2017 at 08:44:46 UTC, Domain wrote: Could anyone show me how to debug in vscode with mago-mi? I have installed vscode with Native Debug, SDLang. I have tried dlang-vscode and code-d. [...] Is the application

How to debug in vscode with mago-mi?

2017-07-17 Thread Domain via Digitalmars-d-learn
Could anyone show me how to debug in vscode with mago-mi? I have installed vscode with Native Debug, SDLang. I have tried dlang-vscode and code-d. My tasks.json: { "version": "2.0.0", "command": "dub", "type": "shell", "presentation": { "echo": true, "reveal":

Re: Debugging D applications from VS code with webfreak.debug

2017-07-10 Thread Domain via Digitalmars-d-learn
On Friday, 24 February 2017 at 13:19:53 UTC, FR wrote: On Friday, 24 February 2017 at 03:15:11 UTC, Jerry wrote: You can use the C++ plugin, which provides a debugger. Just make sure you aren't using optlink, I don't think it generates compatible files. Also you might need to use "-gc" which

Re: make Pid constructor public

2017-04-18 Thread Domain via Digitalmars-d-learn
On Monday, 17 June 2013 at 22:38:47 UTC, Timothee Cour wrote: inside std.process it says: // Pids are only meant to be constructed inside this module, so we make the constructor private. However, this makes a number of useful functions from std.process useless unless the processes were

Cannot build dfix, dcd with dub

2017-04-14 Thread Domain via Digitalmars-d-learn
I use the latest dmd. It seems dub fetch the wrong dependencies C:\Domain\d>dub build dfix --build=release Building package dfix in C:\Users\Domain\AppData\Roaming\dub\packages\dfix-0.3. 1\dfix\ Fetching experimental_allocator 2.70.0-b1 (getting selected version)... Fetching libdparse 0.3.0

Re: How to use readText to read utf16 file?

2015-11-16 Thread Domain via Digitalmars-d-learn
On Tuesday, 17 November 2015 at 02:42:29 UTC, Adam D. Ruppe wrote: On Tuesday, 17 November 2015 at 02:40:14 UTC, Domain wrote: How to use readText to read utf16 file? readText!wstring("filename") should do it for utf16. It will return a wstring, which is utf-16. You can do utf32 with

How to use readText to read utf16 file?

2015-11-16 Thread Domain via Digitalmars-d-learn
How to use readText to read utf16 file? Or other encoding file.

Re: How to use readText to read utf16 file?

2015-11-16 Thread Domain via Digitalmars-d-learn
On Tuesday, 17 November 2015 at 03:12:47 UTC, Steven Schveighoffer wrote: On 11/16/15 10:00 PM, Adam D. Ruppe wrote: On Tuesday, 17 November 2015 at 02:50:44 UTC, Domain wrote: Thanks! But how to remove BOM? Slice the result myself? Yeah. Do something like if(result.length &[0] == bom) {

Another bug in function overloading?

2014-04-26 Thread Domain via Digitalmars-d-learn
module test; public interface I { void foo(); void foo(int); } public abstract class A : I { public void bar() { foo(); } public void foo(int i) { } } public class C : A { public void foo() { } public void bar2() { foo(1);