I want to find out all public functions in all modules in a
package. Can I do that at compile time?
On Wednesday, 3 August 2022 at 12:27:32 UTC, frame wrote:
On Wednesday, 3 August 2022 at 03:36:55 UTC, Domain wrote:
I want to find out all public functions in all modules in a
package. Can I do that at compile time?
You can do something like that:
```d
static foreach (sym; __traits(allMember
The project [Lumars](https://code.dlang.org/packages/lumars) has
released a new version 10 days ago in
[github](https://github.com/BradleyChatha/lumars). But still
unavailable in DUB.
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))
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 opDispatch(str
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.
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 li
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.
How to do that?
/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
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 lib
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 -ldruntime-ldc-sh
On Sunday, 3 March 2019 at 01:51:49 UTC, Domain wrote:
[...]
Sorry, my mistake.
I can build dynamic library now.
I need a xml library which support document entity or xinclude.
The xml may like this:
]>
http://www.w3.org/2001/XInclude";>
&data;
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";>
&data;
Have you looked at this?
https:/
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
> Digitalmar
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
g
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": "
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 ac
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.
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
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
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
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) Me
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
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
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
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?
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 == in
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 st
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": [
{
"name"
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": "0
In Windows, exists, rename, copy will report file not exists when
you input non-English filename, such as Chinese 中文.txt
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 "中文.tx
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 中文
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
0x77E
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("",
data[0].length
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(","));
str
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
!()(string
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 &&
isSomeChar!(ElementEnco
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:
/dlang/dmd/linux/bin64/../../src/phob
How to use readText to read utf16 file? Or other encoding file.
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 readT
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 &&result[0] == bom)
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);
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 (
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 created
47 matches
Mail list logo