On Saturday, 12 December 2020 at 20:25:48 UTC, Adam D. Ruppe
wrote:
On Saturday, 12 December 2020 at 18:14:31 UTC, Paul Backus
wrote:
IMO this is one of the stupider design decisions in D, but
it's unlikely it will ever be fixed.
It is useful in several other contexts though, including user
On Saturday, 12 December 2020 at 18:15:11 UTC, vnr wrote:
Yes, I know Pegged, it's a really interesting parser generator
engine, nevertheless, the grammar of what I would like to
analyse is not a PEG. But I am also curious to know the
performances of this tool for very large inputs.
The
On Saturday, 12 December 2020 at 20:26:00 UTC, Dennis wrote:
If issue 19365 got fixed
eeek I thought that was fixed but apparently not :(
so yeah alias won't work for operator overloads. Does work for
other functions so good technique to know but not here.
So for op prolly go with the
On Saturday, 12 December 2020 at 18:14:31 UTC, Paul Backus wrote:
IMO this is one of the stupider design decisions in D, but it's
unlikely it will ever be fixed.
It is useful in several other contexts though, including user
overriding and private data stores for the mixin.
The easiest
On Saturday, 12 December 2020 at 18:14:31 UTC, Paul Backus wrote:
IMO this is one of the stupider design decisions in D, but it's
unlikely it will ever be fixed. The easiest workaround is to
use string mixins instead, which work the way you'd expect them
to.
If issue 19365 got fixed, it
On Saturday, 12 December 2020 at 18:15:11 UTC, vnr wrote:
On Saturday, 12 December 2020 at 16:43:43 UTC, Bastiaan Veelo
wrote:
Have you looked at Pegged [1]? It will give you the lexer and
parser in one go. I'd be very interested to see how it
performs on that kind of input.
-- Bastiaan.
On Saturday, 12 December 2020 at 18:14:31 UTC, Paul Backus wrote:
Functions from different mixin templates can't overload each
other. The reason for this is that, when you mix in a mixin
template, it does not *actually* add the declarations inside it
to a current scope: instead, it adds them
On Saturday, 12 December 2020 at 16:43:43 UTC, Bastiaan Veelo
wrote:
On Friday, 11 December 2020 at 19:49:12 UTC, vnr wrote:
For a project with good performance, I would need to be able
to analyse text. To do so, I would write a parser by hand
using the recursive descent algorithm, based on a
On Friday, 11 December 2020 at 20:19:49 UTC, H. S. Teoh wrote:
On Fri, Dec 11, 2020 at 07:49:12PM +, vnr via
Digitalmars-d-learn wrote:
[...]
If you want a *really* fast lexer, I recommend using GNU Flex
(https://github.com/westes/flex/). Unfortunately, AFAIK it
does not support D
On Saturday, 12 December 2020 at 17:36:57 UTC, Tobias Pankrath
wrote:
I want to wrap e.g. an int and implement basic arithmetic. In
the provided example [1] I use two mixin templates to
separately implement scaling (multiplication with int/double)
and addition and subtraction with the type
I want to wrap e.g. an int and implement basic arithmetic. In the
provided example [1] I use two mixin templates to separately
implement scaling (multiplication with int/double) and addition
and subtraction with the type itself.
In the end I want to have several distinct wrappers and allow
On Friday, 11 December 2020 at 19:49:12 UTC, vnr wrote:
For a project with good performance, I would need to be able to
analyse text. To do so, I would write a parser by hand using
the recursive descent algorithm, based on a stream of tokens. I
started writing a lexer with the d-lex package
On Saturday, 12 December 2020 at 15:51:46 UTC, Calvin P wrote:
I made a cross build with LDC -g -gdwarf-4 -O0 -D_DEBUG, the
app crash with a report include PC address 0x005e34a9.
[...]
Find the solution:
lldb-11 tests_curl
(lldb) target create "tests_curl"
Current executable set to
I made a cross build with LDC -g -gdwarf-4 -O0 -D_DEBUG, the app
crash with a report include PC address 0x005e34a9.
Is there a way to find the source location for that PC address?
==4172==ERROR: AddressSanitizer: stack-buffer-overflow on address
0x035dfcf0 at pc 0x005e34a9 bp 0x035dfa20 sp
On Saturday, 12 December 2020 at 12:47:59 UTC, Tobias Pankrath
wrote:
On Saturday, 12 December 2020 at 12:18:47 UTC, Andre Pany wrote:
In any case you should have configurations in your dub json.
Thank you for your detailed reply and I am sure I can make it
work in the way you described.
On Saturday, 12 December 2020 at 11:03:06 UTC, Tobias Pankrath
wrote:
On Saturday, 12 December 2020 at 09:05:19 UTC, Godnyx wrote:
I'm trying to create a cool function that will let us do
formatting sorter and faster. The function will work like that:
outln("My name is {name} and my age is
On Saturday, 12 December 2020 at 12:03:49 UTC, kdevel wrote:
I don't have a suggestion for better wording yet.
[1] https://dlang.org/phobos/std_regex.html
This [1] is how I would word it.
[1] https://github.com/dlang/phobos/pull/7724
On Saturday, 12 December 2020 at 12:03:49 UTC, kdevel wrote:
In some situations a ] must be escaped as in
auto re = regex(`^[a\]]$`); // match a and ] only
Unfortunately dmd/phobos does not warn if you forget the
backslash:
auto re = regex(`^[a]]$`); // match a]
This leads me to the
On Saturday, 12 December 2020 at 12:18:47 UTC, Andre Pany wrote:
In any case you should have configurations in your dub json.
Thank you for your detailed reply and I am sure I can make it
work in the way you described.
But I don't think my use case is invalid and dub should improve
its
On Saturday, 12 December 2020 at 12:18:47 UTC, Andre Pany wrote:
On Saturday, 12 December 2020 at 11:13:45 UTC, Tobias Pankrath
wrote:
[...]
In any case you should have configurations in your dub json.
For the first configuration, the name does not matter, it is
used by default for command
On Saturday, 12 December 2020 at 11:13:45 UTC, Tobias Pankrath
wrote:
Whenever I come back to some D, I seem to be stumbling over
dub. Somehow dub and I don't align:
$ dub init dubtest && cd dubtest
$ dub test
-> creates executable `dubtest` (saying Falling back to "dub -b
unittest".)
$
In some situations a ] must be escaped as in
auto re = regex(`^[a\]]$`); // match a and ] only
Unfortunately dmd/phobos does not warn if you forget the
backslash:
auto re = regex(`^[a]]$`); // match a]
This leads me to the documentation [1] which says
\c where c is one of [|*+?()
Whenever I come back to some D, I seem to be stumbling over dub.
Somehow dub and I don't align:
$ dub init dubtest && cd dubtest
$ dub test
-> creates executable `dubtest` (saying Falling back to "dub -b
unittest".)
$ touch source/lib.d
dub test
-> creates executable dubtest-test-library
On Saturday, 12 December 2020 at 09:05:19 UTC, Godnyx wrote:
I'm trying to create a cool function that will let us do
formatting sorter and faster. The function will work like that:
outln("My name is {name} and my age is {age}");
this will be equivalent to:
writeln("My name is ", name, " and
I'm trying to create a cool function that will let us do
formatting sorter and faster. The function will work like that:
outln("My name is {name} and my age is {age}");
this will be equivalent to:
writeln("My name is ", name, " and my age is ", age);
or:
writefln("My name is %s and my age
25 matches
Mail list logo