On Tuesday, 2 September 2014 at 14:53:17 UTC, Dicebot wrote:
This is exactly what I call theoretical speculations. Please
provide specific list like this:
1) some method signature needs to be changed
I propose the following API changes (+ changes on default
implementation):
protected
On Tuesday, 2 September 2014 at 21:00:53 UTC, Nick Sabalausky
wrote:
On 9/2/2014 4:10 PM, Walter Bright wrote:
They said this is an ex partae thing, where until the patent
is
granted, I am not allowed to be part of the process. Only
after a patent
is granted can I file a prior art notice.
How can I check if two TypeTuples containing both types and
values are the same?
This fails:
static assert(is(TypeTuple!(3, int, Zorro) == TypeTuple!(3,
int, Zorro)));
Thank you!
Tudor
On Tuesday, 2 September 2014 at 08:27:14 UTC, Tudor Berariu wrote:
How can I check if two TypeTuples containing both types and
values are the same?
This fails:
static assert(is(TypeTuple!(3, int, Zorro) == TypeTuple!(3,
int, Zorro)));
Thank you!
Tudor
Yeah, this fails because you can't
On Monday, 1 September 2014 at 22:46:52 UTC, Nordlöw wrote:
Is this a other/newer preferred way to describe the template
restriction, using for example __traits(compiles, ...)? Is
is(typeof(...
AFAIK, those produce the same results 99% of the time. The only
cases where they differ are
On Monday, 1 September 2014 at 22:46:52 UTC, Nordlöw wrote:
BTW: Is there a way to prevent the calls to r1.length and
r2.length in this case?
Also, this assumes your ranges have front at all. AFAIK, skipOver
operates on forward ranges. Related: Your condition could fail if
R1/R2 are strings
On Tuesday, 2 September 2014 at 10:22:49 UTC, monarch_dodra wrote:
the fastest way to do this?
Are you talking about constraints, or implementation of
safeSkipOver?
The constraint.
Hum... Are you writing this function because skipOver will
actually fail? AFAIK, it shouldn't. We should fix
On Tuesday, 2 September 2014 at 11:41:51 UTC, Nordlöw wrote:
On Tuesday, 2 September 2014 at 10:22:49 UTC, monarch_dodra
wrote:
the fastest way to do this?
Are you talking about constraints, or implementation of
safeSkipOver?
The constraint.
In that case, I'm not sure what you mean by
On Tuesday, 2 September 2014 at 12:14:01 UTC, monarch_dodra wrote:
In that case, I'm not sure what you mean by fastest in the
context of constraints, which are compile-time.
With performance I mean compilation speed.
I think so yes. That's the R/E version though. Is the R/R
version also
Is it possible to override the behaviour of to!string(x) when x
is an enum. I'm asking because this
enum CxxRefQualifier
{
none,
normalRef,
rvalueRef
}
string toString(CxxRefQualifier refQ) @safe pure nothrow
{
final switch (refQ)
{
case CxxRefQualifier.none: return
On Tuesday, 2 September 2014 at 12:54:55 UTC, Nordlöw wrote:
Is it possible to override the behaviour of to!string(x) when x
is an enum. I'm asking because this
enum CxxRefQualifier
{
none,
normalRef,
rvalueRef
}
string toString(CxxRefQualifier refQ) @safe pure nothrow
{
final
How do I read unicode chars that has code points \u1FFF and
higher from a file?
file.getcw() reads only part of the char, and D identifies this
character as an array of three or four characters.
Importing std.uni does not change the behavior.
Thank you.
sorry, i forgot everything.
here is example of how to do this
-
import std.conv : to;
enum Test
{
One,
Two,
Three,
}
template to(T: string)
{
T to(A: Test)(A val)
{
final switch (val)
{
case Test.One: return 1;
case Test.Two: return 2;
case Test.Three: return 3;
}
}
}
On Tuesday, 2 September 2014 at 14:59:41 UTC, evilrat wrote:
sorry, i forgot everything.
here is example of how to do this
-
import std.conv : to;
enum Test
{
One,
Two,
Three,
}
template to(T: string)
{
T to(A: Test)(A val)
{
final switch (val)
{
case Test.One: return 1;
On Tuesday, 2 September 2014 at 12:54:55 UTC, Nordlöw wrote:
Is it possible to override the behaviour of to!string(x) when x
is an enum. I'm asking because this
enum CxxRefQualifier
{
none,
normalRef,
rvalueRef
}
string toString(CxxRefQualifier refQ) @safe pure nothrow
{
final
On Tuesday, 2 September 2014 at 15:41:17 UTC, monarch_dodra wrote:
Unless we allow defining enum-member functions, AFAIK, it is
impossible to override the printing behavior for enums...
... If your enum actually represents strings, then you could:
enum CxxRefQualifier : string
{
none
On Tuesday, 2 September 2014 at 15:42:36 UTC, monarch_dodra wrote:
Word of warning: You are not overriding to, but rather,
simply defining your own to locally, which resolves as a
better match in the context where you are using it.
If you pass the enum to another function in another module,
On Tuesday, 2 September 2014 at 14:06:04 UTC, seany wrote:
How do I read unicode chars that has code points \u1FFF and
higher from a file?
file.getcw() reads only part of the char, and D identifies this
character as an array of three or four characters.
Importing std.uni does not change the
On Sunday, 31 August 2014 at 08:37:40 UTC, Jonathan M Davis via
Digitalmars-d-learn wrote:
D program should just use string unless it needs random-access,
in which case,
it should use dstring.
Except that dstring is not fool-proof either when one needs to
work at grapheme level.
You can try to create an exception and get stack trace from it.
The functionality is in druntime.
On 09/02/2014 07:06 AM, seany wrote:
How do I read unicode chars that has code points \u1FFF and higher from
a file?
file.getcw() reads only part of the char, and D identifies this
character as an array of three or four characters.
Importing std.uni does not change the behavior.
Thank you.
On Monday, 1 September 2014 at 21:00:46 UTC, Nordlöw wrote:
Are there some nice traits or internals to query the current
call stack for address or perhaps even their (mangled) names.
I'm mostly interested in using this to detect infinite
recursions in my recursive descent parser. This provided
On Tuesday, 2 September 2014 at 17:10:57 UTC, Ali Çehreli wrote:
1) To avoid a common gotcha, note that 'line' is reused at
every iteration here. You must make copies of portions of it if
you need to.
Ali
I don't know if you are aware, but byLineCopy was recently
introduced. It will be
Hi Ali, i know this example from your book.
But try to capture „ the low quotation mark, appearing in the
All-purpose punctuations plane of unicode, with \u201e - I worte
I am having problems with \u1FFF and up.
This particular symbol, is seen as a dchar array \x1e\x20 - so
two dchars,
Linux 64 bit, D2, phobos only.
On 09/02/2014 11:11 AM, seany wrote:
But try to capture „ the low quotation mark, appearing in the
All-purpose punctuations plane of unicode, with \u201e - I worte I am
having problems with \u1FFF and up.
You are doing it differently. Can you show us a minimal example?
Otherwise, there is
On Tuesday, 2 September 2014 at 18:22:54 UTC, Ali Çehreli wrote:
That would happen when you you treat the chars on the input and
individual dchars.
That is precisely where the problem is.
If you use the character in a file, and then open it as a stream,
then use
File.getc()
or
Your example reads the file by lines, i need to get them by chars.
Is it possible to get all overloads of an operator for a particular type?
I.e., having this struct definition, is it possible to tell at compile
time that it can be added with double and int[]?
struct S
{
void opBinary(string op : +)(double);
void opBinary(string op : +)(int[]);
}
To
On Tuesday, 2 September 2014 at 18:55:50 UTC, Ivan Timokhin wrote:
Is it possible to get all overloads of an operator for a
particular type?
I.e., having this struct definition, is it possible to tell at
compile time that it can be added with double and int[]?
struct S
{
void
On Tuesday, 2 September 2014 at 16:49:15 UTC, Kagamin wrote:
On Sunday, 31 August 2014 at 08:37:40 UTC, Jonathan M Davis via
Digitalmars-d-learn wrote:
D program should just use string unless it needs
random-access, in which case,
it should use dstring.
Except that dstring is not fool-proof
On Tuesday, 2 September 2014 at 18:10:19 UTC, Gary Willoughby
wrote:
I've no idea how it is used but '_d_traceContext' might be of
use:
Ok, thanks. I just realized that
http://code.dlang.org/packages/backtrace-d might be of use here
aswell.
On Tuesday, 2 September 2014 at 20:12:12 UTC, Cassio Butrico
wrote:
On Tuesday, 2 September 2014 at 16:49:15 UTC, Kagamin wrote:
On Sunday, 31 August 2014 at 08:37:40 UTC, Jonathan M Davis
via Digitalmars-d-learn wrote:
D program should just use string unless it needs
random-access, in which
On Tuesday, 2 September 2014 at 18:30:55 UTC, seany wrote:
Your example reads the file by lines, i need to get them by
chars.
If you are intent on reading the stream character (or wcharacter)
1 by 1, then you will have to decode them manually, as there is
no getcd.
Unfortunately, the newer
On 09/02/2014 02:13 PM, monarch_dodra wrote:
I'd suggest you create a range out of your std.stream.File, which reads
it byte by byte.
I was in the process of doing just that.
Then, you pass it to the byDchar() range, which will
auto decode those characters. If you really want to do it
On Monday, 1 September 2014 at 15:44:50 UTC, Dicebot wrote:
On Sunday, 31 August 2014 at 03:06:48 UTC, Dicebot wrote:
My guess is that it hasn't been ported to the D1 compiler
yet. Dicebot or any other people who work for Sociomantic
should be most helpful. At this point, I recommend that you
string getString2(in string input) {
long start, end;
while(start input.length input[start] != '')
start++;
start++;
end = input.length - 1;
while(end 0 input[end] != '')
On Wednesday, 3 September 2014 at 04:00:30 UTC, Joel wrote:
string getString2(in string input) {
long start, end;
while(start input.length input[start] != '')
start++;
start++;
end = input.length -
Thanks for the reply.
And indeed, I recently found that ByLine.empty can't be const
because it writes and removes a character from the stream or
something... and when I compile with optimizations, const empty
gets totally wrecked.
I suppose that making empty const doesn't really gain me
I have this piece of code:
template somet(R...) {
static if (R.length)
{
string somet = [\n~R[0]~\n ~ somet!(R[1..R.length]) ~
]\n;
}
else
string somet = ;
}
void main()
{
writeln(somet!(name,tame));
writeln(somet!name);
}
When I compile it, it generates the error
https://issues.dlang.org/show_bug.cgi?id=13410
safety0ff.bugz safety0ff.b...@gmail.com changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=13410
--- Comment #11 from Ketmar Dark ket...@ketmar.no-ip.org ---
(In reply to bearophile_hugs from comment #9)
Right. (But using an unordered_map in the C++ code from the newsgroup the
C++ code only gets a little more than twice slower, that seems
https://issues.dlang.org/show_bug.cgi?id=13416
Brad Roberts bra...@puremagic.com changed:
What|Removed |Added
Hardware|x86_64 |All
https://issues.dlang.org/show_bug.cgi?id=13410
--- Comment #12 from Ketmar Dark ket...@ketmar.no-ip.org ---
(In reply to safety0ff.bugz from comment #10)
As for ketmar's patch, I don't think we should introduce a slowdown in
_aaDelX.
cache bookkeeping turns on only when the code used
https://issues.dlang.org/show_bug.cgi?id=13410
--- Comment #13 from safety0ff.bugz safety0ff.b...@gmail.com ---
(In reply to Ketmar Dark from comment #12)
cache bookkeeping turns on only when the code used byKey/byValue at least
once (i.e. directly or in foreach loop). this is not that frequent
https://issues.dlang.org/show_bug.cgi?id=13388
--- Comment #27 from Don clugd...@yahoo.com.au ---
(In reply to Jonathan M Davis from comment #14)
I really think that we've passed the point where it's worth fixing it.
NO This attitude is the biggest problem D has.
Please, watch Scott
https://issues.dlang.org/show_bug.cgi?id=13083
Denis Shelomovskij verylonglogin@gmail.com changed:
What|Removed |Added
Keywords||wrong-code
https://issues.dlang.org/show_bug.cgi?id=13244
Denis Shelomovskij verylonglogin@gmail.com changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=13286
Denis Shelomovskij verylonglogin@gmail.com changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=13083
--- Comment #1 from Denis Shelomovskij verylonglogin@gmail.com ---
Probably duplicates of this one: Issue 13244 Issue 13286.
--
https://issues.dlang.org/show_bug.cgi?id=13388
--- Comment #28 from Jonathan M Davis jmdavisp...@gmx.com ---
(In reply to Don from comment #27)
(In reply to Jonathan M Davis from comment #14)
I really think that we've passed the point where it's worth fixing it.
NO This attitude is the
https://issues.dlang.org/show_bug.cgi?id=13417
Issue ID: 13417
Summary: segmentation fault when deduce template type
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: critical
https://issues.dlang.org/show_bug.cgi?id=13323
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=13323
--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/7135ddb0d5611462522a20e3b1e15801b045cee5
fix Issue 13323 - UDA
https://issues.dlang.org/show_bug.cgi?id=13415
--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/e5e8a4ad6b0f9cd7a0bf979c701fe4ff223ffd7c
fix Issue 13415 - '-inline'
https://issues.dlang.org/show_bug.cgi?id=11042
--- Comment #4 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/296859699b29b1ef562155ba7b4f7558b4b3b616
fix Issue 11042 -
https://issues.dlang.org/show_bug.cgi?id=11042
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=10158
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
101 - 158 of 158 matches
Mail list logo