On Saturday, 23 March 2019 at 16:56:28 UTC, tchaloupka wrote:
On Saturday, 23 March 2019 at 15:58:07 UTC, Sobaya wrote:
What I am saying is that it can not be read when a code
importing (a.d) a code including the static constructor (b.d)
is compiled into shared library.
Hi. I've tried to
On Saturday, 23 March 2019 at 09:37:16 UTC, Andre Pany wrote:
On Friday, 22 March 2019 at 17:52:34 UTC, Sobaya wrote:
On Friday, 22 March 2019 at 11:00:32 UTC, Andre Pany wrote:
On Friday, 22 March 2019 at 10:51:58 UTC, Sobaya wrote:
[...]
As far as I know different to windows, linus will
On Friday, 22 March 2019 at 11:00:32 UTC, Andre Pany wrote:
On Friday, 22 March 2019 at 10:51:58 UTC, Sobaya wrote:
[...]
As far as I know different to windows, linus will not search
current working directory for a.so. if this is the issue here,
you have different possibilities. You could
I fail to load the shared library created in a specific
situation, but I do not know the cause.
a.d
import b.d
b.d
static this() {}
for above 2 files, I created shared library by following command.
dmd a.d -shared -of=a.so
And I ran below code, but the library is not
On Wednesday, 30 January 2019 at 06:02:02 UTC, FrankLike wrote:
On Wednesday, 30 January 2019 at 05:40:50 UTC, FrankLike wrote:
On Wednesday, 30 January 2019 at 05:14:20 UTC, Sobaya wrote:
[...]
import std.stdio;
import std.process:executeShell;
import core.demangle;
void main()
{
I want to get a mangled name of a D function by
`core.demangle.mangle`, but I'm in trouble because there are no
ways to express a type of a function, which is used for a
template argument of `mangle`.
For example, it is wrong to use the type `int function(int,int)`
to express the type of
I want to connect to a server and communicate with ssh.
So I tried to spawn the process of ssh using pipeProcess
function, and read/write with its pipe's stdin and stdout.
But I don't know how many lines are sent from the server for an
input, so readln function blocks.
I think this can be
On Monday, 15 October 2018 at 06:16:34 UTC, Alex wrote:
On Monday, 15 October 2018 at 04:51:39 UTC, Sobaya wrote:
[...]
Removing constraint, but retaining specialization should be
enough, no?
Then, func is still a template, requiring the argument to be
convertible to an int. When S is
void func(T : int)(T value) if (is(T == int)) {
}
struct S {
int x;
alias x this;
}
void main() {
func(S()); // error
}
In above code, 'func' can accept only int as its argument type,
so when 'S', which can be implicitly convertible into int, is
passed on 'func', I expect S.x is
On Thursday, 20 September 2018 at 12:48:14 UTC, Nicholas Wilson
wrote:
On Thursday, 20 September 2018 at 12:43:02 UTC, Nicholas Wilson
wrote:
Hmm, I can reproduce. Will look into it.
pragma(LDC_intrinsic, "llvm.nvvm.cos.approx.f")
float cos(float val);
does work but is an approximation.
It
On Wednesday, 19 September 2018 at 00:22:44 UTC, Nicholas Wilson
wrote:
On Wednesday, 19 September 2018 at 00:11:13 UTC, Nicholas
Wilson wrote:
On Tuesday, 18 September 2018 at 06:25:33 UTC, Sobaya wrote:
On Tuesday, 18 September 2018 at 01:39:51 UTC, Nicholas
Wilson wrote:
On Tuesday, 18
On Tuesday, 18 September 2018 at 01:39:51 UTC, Nicholas Wilson
wrote:
On Tuesday, 18 September 2018 at 00:25:33 UTC, Sobaya wrote:
I'm waiting for the update. How's your progress?
I t appears I have broke SPIR-V completely somewhere along the
line, I may release a v0.2 with out it, hopefully
On Friday, 7 September 2018 at 10:53:25 UTC, Sobaya wrote:
On Friday, 7 September 2018 at 10:17:47 UTC, Nicholas Wilson
wrote:
On Friday, 7 September 2018 at 06:45:32 UTC, Sobaya wrote:
[...]
You're missing an "m" in "nvvm", dunno if that will fix it.
[...]
I'll be adding these to
On Friday, 7 September 2018 at 10:17:47 UTC, Nicholas Wilson
wrote:
On Friday, 7 September 2018 at 06:45:32 UTC, Sobaya wrote:
[...]
You're missing an "m" in "nvvm", dunno if that will fix it.
[...]
I'll be adding these to DCompute soon (probably Sunday),
LLVM7.0 has just been released
On Friday, 31 August 2018 at 13:30:10 UTC, Nicholas Wilson wrote:
On Thursday, 30 August 2018 at 10:34:33 UTC, Sobaya wrote:
On Monday, 27 August 2018 at 12:47:45 UTC, Nicholas Wilson
wrote:
On Monday, 27 August 2018 at 09:57:18 UTC, Sobaya wrote:
On Monday, 27 August 2018 at 09:41:34 UTC,
On Monday, 27 August 2018 at 12:47:45 UTC, Nicholas Wilson wrote:
On Monday, 27 August 2018 at 09:57:18 UTC, Sobaya wrote:
On Monday, 27 August 2018 at 09:41:34 UTC, 9il wrote:
On Monday, 27 August 2018 at 08:25:14 UTC, Sobaya wrote:
I'm using dcompute(https://github.com/libmir/dcompute).
In
On Monday, 27 August 2018 at 09:41:34 UTC, 9il wrote:
On Monday, 27 August 2018 at 08:25:14 UTC, Sobaya wrote:
I'm using dcompute(https://github.com/libmir/dcompute).
In the development, I have got to use math functions such as
sqrt in @compute function.
But LDC says "can only call
I'm using dcompute(https://github.com/libmir/dcompute).
In the development, I have got to use math functions such as sqrt
in @compute function.
But LDC says "can only call functions from other @compute modules
in @compute code", so can't I call any math functions with
dcompute?
Is there
I'd like to get symbols that have an UDA.
But when the member is private, it is not obtained.
And I found a comment saying "Filtering inaccessible members" in
the source.
Why is it necessary to filter out private members?
On Monday, 29 January 2018 at 19:59:31 UTC, Steven Schveighoffer
wrote:
On 1/29/18 2:40 PM, Sobaya wrote:
class Parent {
int x;
alias x this;
}
class Child : Parent {
}
void main() {
Parent p = new Child;
Child c = cast(Child)p; // cannot cast `int` to `Child`
}
In this
class Parent {
int x;
alias x this;
}
class Child : Parent {
}
void main() {
Parent p = new Child;
Child c = cast(Child)p; // cannot cast `int` to `Child`
}
In this code, I got a compile error.
How can I cast p to Child?
On Monday, 29 January 2018 at 10:06:23 UTC, Simen Kjærås wrote:
On Monday, 29 January 2018 at 09:23:55 UTC, Sobaya wrote:
I found a strange behavior.
class A {
void opAssign(int v) {}
}
class Test {
A a;
this() {
a = new A(); // removing this causes compile error.
I found a strange behavior.
class A {
void opAssign(int v) {}
}
class Test {
A a;
this() {
a = new A(); // removing this causes compile error.
a = 3; // cannot implicitly convert expression `3` of
`int` to `A`
}
}
void main() {
// this is allowed.
A a;
On Saturday, 20 January 2018 at 17:05:40 UTC, Simen Kjærås wrote:
On Saturday, 20 January 2018 at 14:31:59 UTC, Sobaya wrote:
How can I wrap function whose arguments contain both ref and
normal like 'func' ?
With normal 'Args', x is not increased because x is copied
when passed to opDispatch.
I'm using opDispatch for wrapping a function like below.
```
import std.stdio;
void func(ref int x, int y) {
x++;
}
struct B {
// wraps 'func'. I want to implement this function.
template opDispatch(string fn) {
void opDispatch(Args...)(Args args) {
On Tuesday, 26 December 2017 at 00:17:33 UTC, Mike Franklin wrote:
After a few hours trying to figure out why the compiler didn't
catch this, I finally figured it out. You have to add `@safe`.
import std.stdio;
int[] x;
void func(scope int[] a) @safe
{
x = a;
}
void main() @safe {
What means 'scope' in function parameter?
I made a test code.
```
import std.stdio;
int[] x;
void func(scope int[] a) {
x = a;
}
void main() {
func([0,1,2]);
writeln(x);
}
```
This code was successfully compiled and printed '[0, 1, 2]'.
But according to
27 matches
Mail list logo