I have an interface A which declares a certain function. A second
interface B inherits from A and wishes to provide a default
implementation for that function. How can I achieve this? I'm
facing an error when I try this:
interface A
{
int func(int);
}
interface B : A
{
final int func(
Im trying to access data in a global between threads.
So ive set my global to shared, however the object trying to
access it needs to also then be shared, but it cant be because
its part of a library...
Is there any simple way to transfer data from one thread to
another?
1. My situation is
On Thursday, 21 July 2016 at 09:41:27 UTC, Saurabh Das wrote:
I have an interface A which declares a certain function. A
second interface B inherits from A and wishes to provide a
default implementation for that function. How can I achieve
this? I'm facing an error when I try this:
interface
On 21/07/2016 9:44 PM, Brons wrote:
Im trying to access data in a global between threads.
So ive set my global to shared, however the object trying to access it
needs to also then be shared, but it cant be because its part of a
library...
Is there any simple way to transfer data from one thread
On Thursday, 21 July 2016 at 09:47:09 UTC, rikki cattermole wrote:
On 21/07/2016 9:44 PM, Brons wrote:
Im trying to access data in a global between threads.
So ive set my global to shared, however the object trying to
access it
needs to also then be shared, but it cant be because its part
of a
On Wednesday, 20 July 2016 at 16:10:48 UTC, Claude wrote:
R_ARM_TLS_IE32 used with non-TLS symbol ??
Oh, that was actually quite obvious... If I revert the first
android patch on LLVM sources, and build it back it works!
I can build a "Hello world" program on ARM GNU/Linux, with
druntime an
On Thursday, 21 July 2016 at 09:59:53 UTC, Claude wrote:
I can build a "Hello world" program on ARM GNU/Linux, with
druntime and phobos.
I'll write a doc page about that.
It's a good idea :)
On Wednesday, 20 July 2016 at 18:32:15 UTC, Jesse Phillips wrote:
I think you mean that your range library treats them as arrays
of code units, meaning your library will break (some) unicode
strings.
Right - I disagree with the assessment that all (or even most)
char[] types are intended to r
On Thursday, 21 July 2016 at 09:46:10 UTC, Lodovico Giaretta
wrote:
Interesting.
This is worth a bugzilla issue, IMHO. In fact, if you try the
other way (i.e.: you provide an implementation of func in class
C), you get the opposite error, that you are overriding a final
function (B.func).
Su
On Thursday, 21 July 2016 at 09:41:27 UTC, Saurabh Das wrote:
I have an interface A which declares a certain function. A
second interface B inherits from A and wishes to provide a
default implementation for that function.
You can't, interfaces cannot have implementations of virtual
functions.
On Thursday, 21 July 2016 at 10:30:55 UTC, Andrea Fontana wrote:
On Thursday, 21 July 2016 at 09:59:53 UTC, Claude wrote:
I can build a "Hello world" program on ARM GNU/Linux, with
druntime and phobos.
I'll write a doc page about that.
It's a good idea :)
Done:
https://wiki.dlang.org/LDC_c
On Thursday, 21 July 2016 at 12:42:14 UTC, Adam D. Ruppe wrote:
On Thursday, 21 July 2016 at 09:41:27 UTC, Saurabh Das wrote:
I have an interface A which declares a certain function. A
second interface B inherits from A and wishes to provide a
default implementation for that function.
You can
Is there a way to get the full path of the current source file?
Something like:
__FILE_FULL_PATH__
I'm asking because I'm rewriting a batch script in D, meant to be
ran with rdmd. However, the script needs to know it's own path.
The original batch script uses the %~dp0 variable for this, bu
On Thursday, July 21, 2016 21:47:09 rikki cattermole via Digitalmars-d-learn
wrote:
> On 21/07/2016 9:44 PM, Brons wrote:
> > Im trying to access data in a global between threads.
> > So ive set my global to shared, however the object trying to access it
> > needs to also then be shared, but it ca
I was trying to use allocators in a @nogc function.
I tried FreeList!Mallocator and it works fine. But
AllocatorList!Mallocator doesn't work. dmd complains that
AllocatorList.allocate is not @nogc, even when
BookkeepingAllocator is NullAllocator. But if I add '@nogc' to
AllocatorList.allocate
On Thursday, 21 July 2016 at 19:54:34 UTC, Jonathan Marler wrote:
thisExePath won't work.
won't? what this means?
this work on my windows
import std.file: thisExePath;
import std.stdio: writeln;
void main()
{
writeln(thisExePath());
}
On Thursday, 21 July 2016 at 22:28:39 UTC, zabruk70 wrote:
won't? what this means?
That gives the path to the .exe but he wants the path to the .d.
But why? I would think the current working directory is probably
adequate and that's easy to get...
On 7/21/16 3:54 PM, Jonathan Marler wrote:
Is there a way to get the full path of the current source file?
Something like:
__FILE_FULL_PATH__
I'm asking because I'm rewriting a batch script in D, meant to be ran
with rdmd. However, the script needs to know it's own path. The
original batch sc
On Thursday, 21 July 2016 at 22:33:39 UTC, Adam D. Ruppe wrote:
On Thursday, 21 July 2016 at 22:28:39 UTC, zabruk70 wrote:
won't? what this means?
That gives the path to the .exe but he wants the path to the .d.
But why? I would think the current working directory is
probably adequate and th
On Thursday, 21 July 2016 at 22:39:45 UTC, Steven Schveighoffer
wrote:
On 7/21/16 3:54 PM, Jonathan Marler wrote:
Is there a way to get the full path of the current source file?
Something like:
__FILE_FULL_PATH__
I'm asking because I'm rewriting a batch script in D, meant to
be ran
with rdmd.
On Thursday, July 21, 2016 18:39:45 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> On 7/21/16 3:54 PM, Jonathan Marler wrote:
> > Is there a way to get the full path of the current source file?
> > Something like:
> >
> > __FILE_FULL_PATH__
> >
> > I'm asking because I'm rewriting a batch s
On Thursday, July 21, 2016 19:54:34 Jonathan Marler via Digitalmars-d-learn
wrote:
> Is there a way to get the full path of the current source file?
> Something like:
>
> __FILE_FULL_PATH__
>
> I'm asking because I'm rewriting a batch script in D, meant to be
> ran with rdmd. However, the script
I would like to combine two types
template Foo(A, B = 4)
{
union
{
byte b = B;
int a = A << 8;
}
}
This packs a and b together in to an int bytes, saving an
int(rather than storing a and b in an int each) and makes it
easier to access.
I get an error about overlapp
On Thursday, 21 July 2016 at 22:47:42 UTC, Jonathan Marler wrote:
I explain in the original post. Any ideas Adam? Thanks in
advance.
But why does the batch script use it? Since you are rewriting
anyway, maybe you can find an easier/better way to achieve the
goal.
On 07/21/2016 06:48 PM, Rufus Smith wrote:
> I would like to combine two types
>
>
> template Foo(A, B = 4)
> {
> union
> {
> byte b = B;
> int a = A << 8;
> }
> }
>
> This packs a and b together in to an int bytes, saving an int(rather
> than storing a and b in an i
On Friday, 22 July 2016 at 01:52:57 UTC, Adam D. Ruppe wrote:
On Thursday, 21 July 2016 at 22:47:42 UTC, Jonathan Marler
wrote:
I explain in the original post. Any ideas Adam? Thanks in
advance.
But why does the batch script use it? Since you are rewriting
anyway, maybe you can find an easier
On Thursday, 21 July 2016 at 22:57:06 UTC, Jonathan M Davis wrote:
On Thursday, July 21, 2016 18:39:45 Steven Schveighoffer via
Digitalmars-d- learn wrote:
[...]
It would be pretty terrible actually to put the executable in
the source path, and in many cases, the user wouldn't even have
the
On Friday, 22 July 2016 at 02:08:06 UTC, Ali Çehreli wrote:
On 07/21/2016 06:48 PM, Rufus Smith wrote:
> I would like to combine two types
>
>
> template Foo(A, B = 4)
> {
> union
> {
> byte b = B;
> int a = A << 8;
> }
> }
>
> This packs a and b together in to an i
On Thursday, 21 July 2016 at 19:54:34 UTC, Jonathan Marler wrote:
Is there a way to get the full path of the current source file?
Something like:
__FILE_FULL_PATH__
I'm asking because I'm rewriting a batch script in D, meant to
be ran with rdmd. However, the script needs to know it's own
pa
On 07/21/2016 08:00 PM, Rufus Smith wrote:
>> Bitfields may actually be useful in this case:
>>
>> https://dlang.org/phobos/std_bitmanip.html#.bitfields
>>
>
> They don't allow default assignment though?
A factory function can help:
import std.bitmanip;
struct S(int a_init, byte b_init) {
On 2016-07-22 04:24, Jonathan Marler wrote:
The script depends on other files relative to where it exists on the
file system. I couldn't think of a better design to find these files
then knowing where the script exists, can you?
What kind of files are we talking about. Resource files, config
31 matches
Mail list logo