1/3/2013 6:05 AM, Era Scarecrow пишет:
On Wednesday, 2 January 2013 at 21:00:38 UTC, Dmitry Olshansky wrote:
12/31/2012 9:35 PM, Era Scarecrow пишет:
Personally I believe that if we introduce a slice of a BitArray as a
separate range type that represents a view of array (but can't be
appended
On Wednesday, 2 January 2013 at 01:05:09 UTC, Namespace wrote:
Maybe it's best to just make a pull request and let others
inspect the changes and discuss the semantics of auto ref. Or
maybe it would be better to make a thread in digitalmars.D
first?
In my opinion you should do both, thread an
On Thursday, 3 January 2013 at 07:57:46 UTC, Dmitry Olshansky
wrote:
1/3/2013 6:05 AM, Era Scarecrow wrote:
Hm, I'd think that having Slice type be:
BitArraySlice{
BitArray* bp;
size_t start, end;
// all else forwards to the pointed array
}
should work avoiding the most of code duplication. W
1/3/2013 2:20 PM, Era Scarecrow пишет:
On Thursday, 3 January 2013 at 07:57:46 UTC, Dmitry Olshansky wrote:
1/3/2013 6:05 AM, Era Scarecrow wrote:
Hm, I'd think that having Slice type be:
BitArraySlice{
BitArray* bp;
size_t start, end;
// all else forwards to the pointed array
}
should work
Hi,
I have a question concerning compiler optimizations and their
likelihood for const vs. enum declarations.
I came across some code recently that had a bunch of const
declarations that were extracted from a C header. In this very
header, those definitions are in fact #define clauses.
I w
02-Jan-2013 03:54, Charles Hixson пишет:
If I were to use the below as an asynchronous communication channel,
would it avoid deadlocks (presuming that only Cell called Msg) and that
when a thread activated Cell, the first thing it did was process it's
mailbox?
Also, if only around 7 cells were cr
On Thursday, 3 January 2013 at 07:03:23 UTC, monarch_dodra wrote:
On Thursday, 3 January 2013 at 00:08:12 UTC, Peter Summerland
wrote:
On Wednesday, 2 January 2013 at 03:52:21 UTC, bearophile wrote:
Era Scarecrow:
Well I see that you have opIndexUnary twice; According to
the manual you wouldn
On Thursday, January 03, 2013 16:58:11 Phil Lavoie wrote:
> Hi,
>
> I have a question concerning compiler optimizations and their
> likelihood for const vs. enum declarations.
>
> I came across some code recently that had a bunch of const
> declarations that were extracted from a C header. In thi
But if your concern is const variables at module scope being
optimized out of
existence, it is my understanding that they won't be.
All right, thanks for your answer! My concern is indeed const
variable at module scope. I felt like using enums for #define
translations were more appropriate, a
On 01/03/2013 08:40 AM, Dmitry Olshansky wrote:
02-Jan-2013 03:54, Charles Hixson пишет:
If I were to use the below as an asynchronous communication channel,
would it avoid deadlocks (presuming that only Cell called Msg) and that
when a thread activated Cell, the first thing it did was process i
03-Jan-2013 22:38, Charles Hixson пишет:
On 01/03/2013 08:40 AM, Dmitry Olshansky wrote:
02-Jan-2013 03:54, Charles Hixson пишет:
If I were to use the below as an asynchronous communication channel,
would it avoid deadlocks (presuming that only Cell called Msg) and that
when a thread activated
On Thursday, 3 January 2013 at 15:48:50 UTC, Dmitry Olshansky
wrote:
1/3/2013 2:20 PM, Era Scarecrow wrote:
Suddenly it won't work and slicing is only a range and can
only be used in foreach.
No surprise here. Basically container != range over it. It all
flows from there. Range doesn't have a
04-Jan-2013 00:11, Era Scarecrow пишет:
On Thursday, 3 January 2013 at 15:48:50 UTC, Dmitry Olshansky wrote:
1/3/2013 2:20 PM, Era Scarecrow wrote:
Suddenly it won't work and slicing is only a range and can only be
used in foreach.
No surprise here. Basically container != range over it. It al
On 01/03/2013 07:58 AM, Phil Lavoie wrote:
> header.c:
> #define MY_CONST 1
> ...
> module.d:
> enum {
> MY_CONST = 1
> }
Further, there is no need for that anonymous scope in D:
enum MY_CONST = 1;
Even further, I am one of those who reserve all capitals to macros.
Since there are no macr
On Thursday, January 03, 2013 13:34:16 Ali Çehreli wrote:
> On 01/03/2013 07:58 AM, Phil Lavoie wrote:
> > header.c:
> > #define MY_CONST 1
> > ...
> > module.d:
> > enum {
> > MY_CONST = 1
> > }
>
> Further, there is no need for that anonymous scope in D:
>
> enum MY_CONST = 1;
>
> Even further
On Thursday, 3 January 2013 at 21:15:19 UTC, Dmitry Olshansky
wrote:
04-Jan-2013 00:11, Era Scarecrow wrote:
Appending a slice *to* BitArray is perfectly fine as in fact
any range of bool (or bit if you like). Any array-like or
string-like container has to support appending a range of
elemen
Hello,
I was wondering if there would be some way to verify arguments to
a function at compile time, but at runtime call only one function
(in D2).
To clarify what I mean:
Say you have something like printf()
printf(const char[] format, ...)
I want to be able to make sure the arguments pas
DProgrammer2:
If there's no good way to do this that's fine.
I bring this up because I saw
https://github.com/xomboverlord/xomb/blob/unborn/kernel/core/kprintf.d
which was neat, but it generates a new kprintf function for
different arguments. I thought it'd be interesting to try and
have th
On 01/03/2013 11:34 AM, Dmitry Olshansky wrote:
03-Jan-2013 22:38, Charles Hixson пишет:
On 01/03/2013 08:40 AM, Dmitry Olshansky wrote:
02-Jan-2013 03:54, Charles Hixson пишет:
If I were to use the below as an asynchronous communication channel,
would it avoid deadlocks (presuming that only C
19 matches
Mail list logo