On Saturday, 24 June 2023 at 16:42:45 UTC, Cecil Ward wrote:
On Saturday, 24 June 2023 at 15:12:14 UTC, Jonathan M Davis
wrote:
[...]
Yeah, it would take me forever to get my head around that, and
I only want a crude toy partial parser for certain portions of
the grammar, and the parsing cod
On Saturday, 24 June 2023 at 15:12:14 UTC, Jonathan M Davis wrote:
On Saturday, June 24, 2023 8:43:00 AM MDT Cecil Ward via
Digitalmars-d-learn wrote:
I started out looking into a number of runtime library
routines, but in the end it seemed quicker to roll my own code
for a crude recursive desc
On Saturday, June 24, 2023 8:43:00 AM MDT Cecil Ward via Digitalmars-d-learn
wrote:
> I started out looking into a number of runtime library routines,
> but in the end it seemed quicker to roll my own code for a crude
> recursive descent parser/lexer that parses part of D’s grammar
> for expressio
On Saturday, 24 June 2023 at 12:05:26 UTC, Jonathan M Davis wrote:
On Saturday, June 24, 2023 1:43:53 AM MDT Cecil Ward via
Digitalmars-d-learn wrote:
On Saturday, 24 June 2023 at 07:36:26 UTC, Cecil Ward wrote:
> [...]
I just realised something, your point about altering the table
and having
On Saturday, June 24, 2023 1:43:53 AM MDT Cecil Ward via Digitalmars-d-learn
wrote:
> On Saturday, 24 June 2023 at 07:36:26 UTC, Cecil Ward wrote:
> > Jonathan, is it possible that I wanted one thing and got
> > another? My description in the earlier post was of the _aim_ of
> > the program. What
On Saturday, 24 June 2023 at 07:36:26 UTC, Cecil Ward wrote:
Jonathan, is it possible that I wanted one thing and got
another? My description in the earlier post was of the _aim_ of
the program. What I ended up with might be something else? I
wanted an array of uints whose values are the result
On Saturday, 24 June 2023 at 01:28:03 UTC, Jonathan M Davis wrote:
On Friday, June 23, 2023 7:02:12 PM MDT Cecil Ward via
Digitalmars-d-learn wrote:
I just had a fight with LDC over the following code when I
tried out reserve. I have an associative array that maps
strings to ‘ordinals’ ie uints
On 6/20/23 19:09, Cecil Ward wrote:
> 2.) I have a dynamic array and I wish to preinitialise its alloc cell to
> be a certain large size so that I don’t need to reallocate often
To be complete, 'assumeSafeAppend' must be mentioned here as well.
Without it, there will be cases where the GC canno
On Friday, June 23, 2023 7:02:12 PM MDT Cecil Ward via Digitalmars-d-learn
wrote:
> I just had a fight with LDC over the following code when I tried
> out reserve. I have an associative array that maps strings to
> ‘ordinals’ ie uints that are unique, and the compiler hates the
> call to reserve.
On Thursday, 22 June 2023 at 05:21:52 UTC, Cecil Ward wrote:
On Thursday, 22 June 2023 at 01:44:22 UTC, Jonathan M Davis
wrote:
On Wednesday, June 21, 2023 7:05:28 PM MDT Paul Backus via
Digitalmars-d-learn wrote:
[...]
To add to that, it _has_ to know the element type, because
aside from an
On Thursday, 22 June 2023 at 01:44:22 UTC, Jonathan M Davis wrote:
On Wednesday, June 21, 2023 7:05:28 PM MDT Paul Backus via
Digitalmars-d-learn wrote:
[...]
To add to that, it _has_ to know the element type, because
aside from anything related to a type's size, it bit-blits the
type's init
On Thursday, 22 June 2023 at 01:05:28 UTC, Paul Backus wrote:
On Thursday, 22 June 2023 at 00:10:19 UTC, Cecil Ward wrote:
Is .reserve()’s argument scaled by the entry size after it is
supplied, that is it is quoted in elements or is it in bytes?
I’m not sure whether the runtime has a knowledge
On Wednesday, June 21, 2023 7:05:28 PM MDT Paul Backus via Digitalmars-d-learn
wrote:
> On Thursday, 22 June 2023 at 00:10:19 UTC, Cecil Ward wrote:
> > Is .reserve()’s argument scaled by the entry size after it is
> > supplied, that is it is quoted in elements or is it in bytes?
> > I’m not sure
On Thursday, 22 June 2023 at 00:10:19 UTC, Cecil Ward wrote:
Is .reserve()’s argument scaled by the entry size after it is
supplied, that is it is quoted in elements or is it in bytes?
I’m not sure whether the runtime has a knowledge of the element
type so maybe it doesn’t know anything about s
On Wednesday, 21 June 2023 at 15:48:56 UTC, H. S. Teoh wrote:
On Wed, Jun 21, 2023 at 02:09:26AM +, Cecil Ward via
Digitalmars-d-learn wrote:
First is an easy one:
1.) I have a large array and a sub-slice which I want to set
up to be pointing into a sub-range of it. What do I write if I
k
On Wednesday, 21 June 2023 at 04:52:06 UTC, Jonathan M Davis
wrote:
On Tuesday, June 20, 2023 8:09:26 PM MDT Cecil Ward via
Digitalmars-d-learn wrote:
[...]
When slicing, the end index is exclusive. e.g.
[...]
Actually concerning the garbage, I was rather hoping that it
_would_ be garbage
On Wednesday, 21 June 2023 at 04:52:06 UTC, Jonathan M Davis
wrote:
On Tuesday, June 20, 2023 8:09:26 PM MDT Cecil Ward via
Digitalmars-d-learn wrote:
[...]
When slicing, the end index is exclusive. e.g.
[...]
Thankyou to both posters for your exceptionally helpful and
generous replies, wh
On Wed, Jun 21, 2023 at 02:09:26AM +, Cecil Ward via Digitalmars-d-learn
wrote:
> First is an easy one:
>
> 1.) I have a large array and a sub-slice which I want to set up to be
> pointing into a sub-range of it. What do I write if I know the start
> and end indices ? Concerned about an off-b
On Tuesday, June 20, 2023 8:09:26 PM MDT Cecil Ward via Digitalmars-d-learn
wrote:
> First is an easy one:
>
> 1.) I have a large array and a sub-slice which I want to set up
> to be pointing into a sub-range of it. What do I write if I know
> the start and end indices ? Concerned about an off-by-
First is an easy one:
1.) I have a large array and a sub-slice which I want to set up
to be pointing into a sub-range of it. What do I write if I know
the start and end indices ? Concerned about an off-by-one error,
I have start_index and past_end_index (exclusive).
2.) I have a dynamic arra
Hi All,
Thank you so much! It really helps!
Regards,
Sam
Simen Kjaeraas wrote:
Sam Huwrote:
Q4.In the delegate somFnExp:front(),popFront,empty() are all not
defined??Anyway it is not an interface ,so why it is allowed?
Basically, is(typeof(X)) is D magic.
One could interpret it as 'is X a valid type', or perhaps more
correctly as 'does X compile'.
Sam Huwrote:
Q4.In the delegate somFnExp:front(),popFront,empty() are all not
defined??Anyway it is not an interface ,so why it is allowed?
Basically, is(typeof(X)) is D magic.
One could interpret it as 'is X a valid type', or perhaps more
correctly as 'does X compile'. So if SomeFnExp does
Sam Hu Wrote:
> Thanks.The construct is clear now.
>
> Still leaves Q1,that is ,the *if* expression after the template definition,I
> want to learn more about the usage,where can I find more information?
It is in the spec: http://www.digitalmars.com/d/2.0/template.html#Constraint
Thanks.The construct is clear now.
Still leaves Q1,that is ,the *if* expression after the template definition,I
want to learn more about the usage,where can I find more information?
and one more question here:
Q4.In the delegate somFnExp:front(),popFront,empty() are all not
defined??Anyway it i
Hello Sam,
Hello,
For the given example below,
E1:
template Chain(R...) if (allSatisfy!(isInputRange, R))
{
static if (R.length > 1)
alias ChainImpl!(R) Chain;
else
alias R[0] Chain;
}
Q1: What's *if* statement doing right after the template definite?I
can guess what the purpose is but I can n
Hello,
For the given example below,
E1:
template Chain(R...) if (allSatisfy!(isInputRange, R))
{
static if (R.length > 1)
alias ChainImpl!(R) Chain;
else
alias R[0] Chain;
}
Q1: What's *if* statement doing right after the template definite?I can guess
what the purpose is
27 matches
Mail list logo