On 2017-07-09 21:43, Christian Köstlin wrote:
I wonder if there is any fiber based / fiber compatible UI-Toolkit out
for dlang. The second question is, if it would make sense at all to have
such a thing?
If I recall correctly, vibe.d has some form of integration with the
native GUI event loop
On 2017-07-09 23:12, bauss wrote:
I believe OSX (possibly macOS too.) only allows it from the main thread.
Yes, that's correct. But what's the difference between OSX and macOS ;)
--
/Jacob Carlborg
On 2017-07-07 21:40, FoxyBrown wrote:
What's the "best" way to do this? I want something I can simply load at
startup in a convenient and easy way then save when necessary(possibly
be efficient at it, but probably doesn't matter).
Simply json an array and save and load it, or is there a better
I need to pass a group of (C) function pointers to another
language from D... is there a way to derrive a name from a
function pointer? Or do I have to manually list out the names?
On Sunday, 9 July 2017 at 19:43:14 UTC, Christian Köstlin wrote:
I wonder if there is any fiber based / fiber compatible
UI-Toolkit out for dlang. The second question is, if it would
make sense at all to have such a thing?
As previously noted, like other UI toolkits GTK maintains a
single thr
On 2017-07-10 15:37, Gerald wrote:
Having said that, I'm in the camp where this doesn't make much sense.
Using fibers on the main UI thread is likely going to result in a
blocked UI whenever a fiber takes too long to do its work. History has
shown that cooperative multi-tasking typically doesn
On 10.07.17 15:37, Gerald wrote:
> On Sunday, 9 July 2017 at 19:43:14 UTC, Christian Köstlin wrote:
>> I wonder if there is any fiber based / fiber compatible UI-Toolkit out
>> for dlang. The second question is, if it would make sense at all to
>> have such a thing?
>
> As previously noted, like o
I feel like I must be missing something here.
This works:
alias T = int;
T** f(const T** input) pure
{
T** output;
return output;
}
void main()
{
T i;
T* p = &i;
immutable T** r = f(&p);
}
`f` is `pure`, its parameter is const, and its return type has mutable
in
10.07.2017 17:57, ag0aep6g пишет:
I feel like I must be missing something here.
This works:
alias T = int;
T** f(const T** input) pure
{
T** output;
return output;
}
void main()
{
T i;
T* p = &i;
immutable T** r = f(&p);
}
`f` is `pure`, its parameter is const,
On 07/10/2017 05:42 PM, drug wrote:
10.07.2017 17:57, ag0aep6g пишет:
[...]
The error message is: "cannot implicitly convert expression (f(& p)) of
type immutable(int)** to immutable(int**)".
[...]
I'm not sure I understand, but
```
immutable (T)** r = f(&p);
```
compiles. So compiler complai
On Saturday, 8 July 2017 at 15:23:10 UTC, Eric wrote:
import std.stdio;
check check one two
On 07/08/2017 08:23 AM, Eric wrote:
> enum AS : string[2] { a = ["1","2"], b = ["3","4"] };
> enum BS : string[2] { a = ["5","6"], b = ["7","8"] };
>
> void funcs(AS a) { writeln("AS"); }
> void funcs(BS b) { writeln("BS"); }
> funcs(AS.a); // compiler error: matches both funcs(AS) and func
On 07/10/2017 05:26 AM, SauceKode wrote:
> I need to pass a group of (C) function pointers to another language from
> D... is there a way to derrive a name from a function pointer? Or do I
> have to manually list out the names?
libunwind should be able to provide that functionality. Otherwise, no
On 07/09/2017 02:38 AM, Jean-Louis Leroy wrote:
When I look at ldc2's object.d I have the impression it's thread local.
I may be wrong though, just beginning to learn about 'shared'.
Unless it's marked as shared or __gshared it's thread-local by default.
Ali
On Sun, Jul 09, 2017 at 06:48:30AM +, Stefan Koch via Digitalmars-d-learn
wrote:
> On Sunday, 9 July 2017 at 04:03:09 UTC, H. S. Teoh wrote:
[...]
> > Stefan Koch allegedly will add a ctfeWriteln to his new CTFE engine
> > that should alleviate this limitation.
> >
> >
> > T
>
> In fact ctf
On Sun, Jul 09, 2017 at 10:21:59PM +, FoxyBrown via Digitalmars-d-learn
wrote:
> How can we iterate over a variadic and have it's index. I'll do
> different things depend on if it's an even or odd index, but seems to
> be no way to get it.
Easy:
auto func(Args...)(Args args) {
On 07/10/2017 08:31 PM, H. S. Teoh via Digitalmars-d-learn wrote:
if (i % 2) {
// even
odd
... // do something with arg
} else {
// odd
even
Is there something special about ClassInfo that confuses? Look at
this example:
struct Foo
{
}
class Bar
{
}
void main()
{
Foo*[Bar] a;
auto aa = a.dup; // OK
Foo*[ClassInfo] b; // Error: static assert "cannot call
Foo*[TypeInfo_Class].dup because Foo* is not copyable"
auto bb = b.d
On 07/10/2017 11:46 AM, Jean-Louis Leroy wrote:
> Is there something special about ClassInfo that confuses? Look at this
> example:
>
> struct Foo
> {
>
> }
>
> class Bar
> {
> }
>
> void main()
> {
> Foo*[Bar] a;
> auto aa = a.dup; // OK
> Foo*[ClassInfo] b; // Error: static assert "cannot
Cannot get the offset of static members of a struct
struct X
{
__gshared public:
int x;
}
X.x.offsetof < invalid.
We can clearly get a pointer to the static struct X since &X.x is
effectively the address of X(regardless nomenclature and
terminology issues in D trying to hide this
Hello!
I have written some D code that I need to link to :C++ huge
project. Let it be just one function that uses GC. The question
is: if C++ code creates several threads and runs this :D function
simultaneously, will GC work correctly?
p.s. Of course the druntime is initialized before it.
On Monday, 10 July 2017 at 20:01:39 UTC, FoxyBrown wrote:
Cannot get the offset of static members of a struct
That's because static members do not have an offset. They are not
part of the struct in memory, just in name.
We can clearly get a pointer to the static struct X
There's barely an
Cannot get the offset of static members of a struct
struct X
{
__gshared public:
int x;
}
X.x.offsetof < invalid.
We can clearly get a pointer to the static struct X since &X.x is
effectively the address of X(regardless nomenclature and
terminology issues in D trying to hide this
Still haven't figured out what's wrong. Any help would be
appreciated.
NoBigDeal256 wrote:
I'm currently learning D and started working on one of my first projects
which is an API wrapper. I'm currently having an issue with my program
getting a InvalidMemoryOperationError upon exiting the process on Windows
7. On my Debian VM I get a segmentation fault.
known b
On Monday, 10 July 2017 at 20:31:12 UTC, ketmar wrote:
NoBigDeal256 wrote:
I'm currently learning D and started working on one of my
first projects which is an API wrapper. I'm currently having
an issue with my program getting a InvalidMemoryOperationError
upon exiting the process on Windows
NoBigDeal256 wrote:
Do you happen
to have a link to the bug report for this specific issue that I could
look at? I looked at the known bugs list and couldn't find anything
related to this.
nope. it is a kind of "known bug nobody bothered to report". ;-)
On Monday, 10 July 2017 at 20:13:46 UTC, Adam D. Ruppe wrote:
On Monday, 10 July 2017 at 20:01:39 UTC, FoxyBrown wrote:
Cannot get the offset of static members of a struct
That's because static members do not have an offset. They are
not part of the struct in memory, just in name.
We can c
On 07/10/2017 02:14 PM, FoxyBrown wrote:
> On Monday, 10 July 2017 at 20:13:46 UTC, Adam D. Ruppe wrote:
>> On Monday, 10 July 2017 at 20:01:39 UTC, FoxyBrown wrote:
>>> Cannot get the offset of static members of a struct
>>
>> That's because static members do not have an offset. They are not part
On Monday, 10 July 2017 at 19:11:37 UTC, Ali Çehreli wrote:
On 07/10/2017 11:46 AM, Jean-Louis Leroy wrote:
> Is there something special about ClassInfo that confuses?
Look at this
> example:
>
> struct Foo
> {
>
> }
>
> class Bar
> {
> }
>
> void main()
> {
> Foo*[Bar] a;
> auto aa = a.dup;
Hi!
I have vibe.d application and long-standing error in it.
For the current moment, I have logs for stdout, stderr, and
additional log to write exceptions I catch. This error gives me
only the short line in stderr log:
core.exception.InvalidMemoryOperationError@src/core/exception.d(696): Inv
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
On 7/11/2017 6:14 AM, FoxyBrown wrote:
On Monday, 10 July 2017 at 20:13:46 UTC, Adam D. Ruppe wrote:
No, it isn't. Static members are stored in an entirely different place
than non-static members. They are really just global variables in
memory with their in-source name being nested somewhere
On Monday, 10 July 2017 at 14:03:59 UTC, Jacob Carlborg wrote:
On 2017-07-10 15:37, Gerald wrote:
Having said that, I'm in the camp where this doesn't make much
sense. Using fibers on the main UI thread is likely going to
result in a blocked UI whenever a fiber takes too long to do
its work.
On Monday, 10 July 2017 at 08:40:15 UTC, Jacob Carlborg wrote:
On 2017-07-09 23:12, bauss wrote:
I believe OSX (possibly macOS too.) only allows it from the
main thread.
Yes, that's correct. But what's the difference between OSX and
macOS ;)
Well besides that it's newer versions of the OS,
On Monday, 10 July 2017 at 20:03:32 UTC, Igor Shirkalin wrote:
Hello!
I have written some D code that I need to link to :C++ huge
project. Let it be just one function that uses GC. The question
is: if C++ code creates several threads and runs this :D
function simultaneously, will GC work corr
On 2017-07-11 04:40, Gerald wrote:
Thanks for the link, I'm not active with .Net so I had to go look it up.
Reminds me a lot of the way node.js works. If all your async activity is
IO bound maybe it works fine and I'm wrong about this.
My past experience has been that it's challenging to det
37 matches
Mail list logo