superretard, is it?
On 2010-02-04 18:16:55 -0500, Andrei Alexandrescu
said:
Rainer Deyke wrote:
Don wrote:
I suspect that string, wstring should have been the primary types and
had a .codepoints property, which returned a ubyte[] resp. ushort[]
reference to the data. It's too late, of course. The extra value yo
Trass3r wrote:
I wonder if an array operation could be reasonably included.
It's a quite common case and there are direct SSE instructions for it
since SSE 4.1.
This would be achieved by adding array aggregate properties, an idea
that has cropped up a few times, though I can't seem to find an
Nick Sabalausky wrote:
"Trass3r" wrote in message
Some date back to dmd 0.164 and one even is for gdc! Shouldn't those be
closed to keep the system clean?
Just because there's a patch submitted doesn't mean it's been accepted and
incorporated into DMD.
That depends on whether by "closed
Rainer Deyke wrote:
Andrei Alexandrescu wrote:
One idea I've had for a while was to have a universal string type:
struct UString {
union {
char[] utf8;
wchar[] utf16;
dchar[] utf32;
}
enum Discriminator { utf8, utf16, utf32 };
Discriminator kind;
Inte
"Trass3r" wrote in message
news:op.u7molquq3nc...@hoenir.fem.tu-ilmenau.de...
>I just searched for the keyword patch to see how many tickets are still
>open with submitted patches:
> http://d.puremagic.com/issues/buglist.cgi?keywords=patch&query_format=advanced&keywords_type=allwords&order=Last%
Andrei Alexandrescu wrote:
> One idea I've had for a while was to have a universal string type:
>
> struct UString {
> union {
> char[] utf8;
> wchar[] utf16;
> dchar[] utf32;
> }
> enum Discriminator { utf8, utf16, utf32 };
> Discriminator kind;
> Inter
Andrei Alexandrescu wrote:
Rainer Deyke wrote:
Don wrote:
I suspect that string, wstring should have been the primary types and
had a .codepoints property, which returned a ubyte[] resp. ushort[]
reference to the data. It's too late, of course. The extra value you get
by having a specific type
Joel Anderson Wrote:
>
> That's one of the reasons I've wished D had a nicer syntax for the
> string mixin format. This one kinda scares people away :p
What kind of syntax do you have in mind?
Making mixins less obtrusive might ease aggravation when they're being used as
boilerplate, but mak
Right at the beginning of the file there is:
module std.intrinsic;
nothrow:
Nevertheless some functions are
pure nothrow int bsf(uint v);
some not:
int btc(uint *p, uint bitnum);
So either those nothrows are obsolete or the nothrow: is a mistake, right?
I'll volunteer if no one else has
On 02/03/2010 09:01 PM, Andrei Alexandrescu wrote:
I'd like to propose a small project suggested by Walter. If anyone could
take this up, it would be great. The project is a small utility program
that could be a good complement to the likes of rdmd.
The program
I just searched for the keyword patch to see how many tickets are still
open with submitted patches:
http://d.puremagic.com/issues/buglist.cgi?keywords=patch&query_format=advanced&keywords_type=allwords&order=Last%20Changed&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED
Some date back t
Hello Joel,
PPS: Riot is looking for some strong senior engineers (3years+
experienced) so if your looking for work you may check out
www.riotgames.com.
Well I'm in the market, but I rater suspect that I don't have enough experience
(~3 year, but none in that domain). Oh, well. (OTOH if anyon
dsimcha wrote:
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
Believe it or not, you can do profile guided optimizations with the dmd
profiler and optlink. The profiler will emit a file to be passed to the
linker which will set the layout of functions to minimize paging.
Is
Rainer Deyke wrote:
Don wrote:
I suspect that string, wstring should have been the primary types and
had a .codepoints property, which returned a ubyte[] resp. ushort[]
reference to the data. It's too late, of course. The extra value you get
by having a specific type for 'this is a code point fo
Don wrote:
Andrei Alexandrescu wrote:
Michel Fortin wrote:
On 2010-02-04 12:19:42 -0500, Andrei Alexandrescu
said:
bearophile wrote:
Simen kjaeraas:
Of the above, I feel (b) is the correct solution, and I understand
it has already been implemented in svn.
Yes, I presume he was mostly lo
Andrei Alexandrescu wrote:
Has any thought been given to foreach? Currently all these work for
strings:
foreach (c; "abc") { } // typeof(c) is 'char'
foreach (char c; "abc") { }
foreach (wchar c; "abc") { }
foreach (dchar c; "abc") { }
I'm concerned about the first case where t
== Quote from Jerry Quinn (jlqu...@optonline.net)'s article
> Don Wrote:
> > We seem to be approaching the point where char[], wchar[] and dchar[]
> > are all arrays of dchar, but with different levels of compression.
> > It makes me wonder if the char, wchar types actually make any sense.
> > If c
Don wrote:
> I suspect that string, wstring should have been the primary types and
> had a .codepoints property, which returned a ubyte[] resp. ushort[]
> reference to the data. It's too late, of course. The extra value you get
> by having a specific type for 'this is a code point for a UTF8 string
Don Wrote:
> We seem to be approaching the point where char[], wchar[] and dchar[]
> are all arrays of dchar, but with different levels of compression.
> It makes me wonder if the char, wchar types actually make any sense.
> If char[] is actually a UTF string, then char[] ~ char should be
> permi
Ali Çehreli wrote:
> ...
>
> The change sounds ok and hasLength should yield true. Or... can it
> return an enum { no, kind_of, yes } ;)
>
> ...
>
> Ali
I believe what you're after is this:
enum Bool
{
True,
False,
FileNotFound
}
Andrei Alexandrescu wrote:
Michel Fortin wrote:
On 2010-02-04 12:19:42 -0500, Andrei Alexandrescu
said:
bearophile wrote:
Simen kjaeraas:
Of the above, I feel (b) is the correct solution, and I understand
it has already been implemented in svn.
Yes, I presume he was mostly looking for a
Hello dsimcha,
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
Believe it or not, you can do profile guided optimizations with the
dmd profiler and optlink. The profiler will emit a file to be passed
to the linker which will set the layout of functions to minimize
paging.
On Thu, 04 Feb 2010 14:29:41 +0300, Bill Baxter wrote:
I imagine a lot of people here don't remember me when I left a few
years ago
to focus on a free game called league of legends
(www.leagueoflegends.com).
Its been released however we're still working on making it even better.
Just out
Andrei Alexandrescu:
> I am ready to throw away the implementation as soon as a better idea
> comes around. As other times, I operated the change to see how things
> feel with the new approach.
And just to be sure: you are better than me because you actually implement
things, while I am here ju
bearophile wrote:
> Time ago you (Andrei) told me that you don't like a function like
len() to have a different computational complexity, like O(n) or O(1),
according to the input.
This reminds me of an excellent talk by Matt Austern on STL's
singly-linked lists.
One of the interesting poin
Michel Fortin wrote:
On 2010-02-04 12:19:42 -0500, Andrei Alexandrescu
said:
bearophile wrote:
Simen kjaeraas:
Of the above, I feel (b) is the correct solution, and I understand
it has already been implemented in svn.
Yes, I presume he was mostly looking for a justification of his ideas
h
On 2010-02-04 12:19:42 -0500, Andrei Alexandrescu
said:
bearophile wrote:
Simen kjaeraas:
Of the above, I feel (b) is the correct solution, and I understand
it has already been implemented in svn.
Yes, I presume he was mostly looking for a justification of his ideas
he has already accepted
bearophile wrote:
Simen kjaeraas:
Of the above, I feel (b) is the correct solution, and I understand
it has already been implemented in svn.
Yes, I presume he was mostly looking for a justification of his ideas
he has already accepted and even partially implemented :-)
I am ready to throw aw
Simen kjaeraas:
> Of the above, I feel (b) is the correct solution, and I understand it
> has already been implemented in svn.
Yes, I presume he was mostly looking for a justification of his ideas he has
already accepted and even partially implemented :-)
Bye,
bearophile
Trass3r:
> What about C++ code?
I think D classes are not compatible with C++ ones. And even if that becomes
possible you can use the safest approach when a C++-compiled opaque module uses
classes and doesn't have that required data structure that all D modules must
have.
Anyway, Walter has no
dsimcha:
> Is that still a relevant optimization? It probably made sense circa 1995 when
> computers had much less memory, but now I would think that binaries are so
> much
> smaller than a typical computer's memory that they almost never get paged out.
It's useful still, but just a little, ther
Andrei Alexandrescu wrote:
What can be done about that? I see a number of solutions:
(a) Do not operate the change at all.
(b) Operate the change and mention that in range algorithms you should
check hasLength and only then use "length" under the assumption that it
really means "elements
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
> bearophile wrote:
> > Partially unrelated note: LLVM plans to add a profile guided
> > optimization level too, to be used with -O6, as GCC too does. LLVM
> > also plans to do something that GCC is not currently able to do, the
> >
Let's try again. I think there can be two types of opaque binary only
modules:
- Ones compiled from C code, or with a C interface. Such modules can't
contain classes, so there is no problem with virtual functions.
- Ones compiled from D code, or that use the D code interface, that can
contain
Andrei Alexandrescu Wrote:
> It's no secret that string et al. are not a magic recipe for writing
> correct Unicode code. However, things are pretty good and could be
> further improved by operating the following changes in std.array and
> std.range:
>
> These changes effectively make UTF-8 an
> The String structs can cache inside themselves the length and hash value the
> first time such
> values are computed (so each String is a struct 4 words long).
So it's not really immutable. It contains an immutable dynamic array that can
be called "str", plus two mutable words.
To access the u
I'd like D to give the right results and to be not bug-prone by default (even
if it's a bit slower) and do something more optimized but maybe faster when I
want it and I know what I am doing. So I like the idea of making strings more
correct.
I liked the idea of D strings acting like normal arr
Wed, 03 Feb 2010 20:55:46 +0100, Don wrote:
> Trass3r wrote:
>> I wonder if an array operation could be reasonably included. It's a
>> quite common case and there are direct SSE instructions for it since
>> SSE 4.1.
>
> Indeed. The difficult question is, what would the syntax be?
a · b
Michel Fortin wrote:
> ...
>
> As for .length, I'll say that removing this property would make it hard
> to write low-level code. For instance, if I copy a string into a buffer,
> I need to know the length in bytes (array.length * sizeof(array[0])),
> not the number of characters. So it doesn't ma
Before we solve the difficult problem of naming the thing could we first
go through the trivial part of optimizing it under its current name.
http://www.digitalmars.com/d/2.0/phobos/std_numeric.html#dotProduct
it's not like it couldn't be done in parallel :)
grauzone wrote:
Change the type of string literals from char[] (or whatever the string
type is in D2) to a wrapper struct defined in object.d:
struct string {
char[] raw;
}
Now string.length is invalid, and you don't have to do weird stuff as in
(b) or (c).
From here on, you coul
> I imagine a lot of people here don't remember me when I left a few years ago
> to focus on a free game called league of legends (www.leagueoflegends.com).
> Its been released however we're still working on making it even better.
Just out of curiosity, what's the business model? Is there in-gam
Am 04.02.2010, 04:05 Uhr, schrieb grauzone :
Andrei Alexandrescu wrote:
What can be done about that? I see a number of solutions:
(a) Do not operate the change at all.
(b) Operate the change and mention that in range algorithms you should
check hasLength and only then use "length" under the
Andrei Alexandrescu Wrote:
> Walter Bright wrote:
> > Andrei Alexandrescu wrote:
> >> Oh, one more thing: doing mixed-width searches would require decoding.
> >
> > Or a conversion before the loop starts of the search term.
>
> That triggers memory allocation plus the same cost. It's not likely
bearophile wrote:
Partially unrelated note: LLVM plans to add a profile guided
optimization level too, to be used with -O6, as GCC too does. LLVM
also plans to do something that GCC is not currently able to do, the
level -O7 lifelong optimization. This is like in Java, the profile
guided optimiza
Walter Bright:
> Not impossible, and a "pseudo-link" could be done after the semantic
> phase of compilation, but these things would be a lot of work to implement.
OK. People can live with a compiler that doesn't perform all possible
optimizations from its first version 1.0, but I think it's imp
Chad J:
> This reminds me of a discussion we had a year or more ago about offering
> abstract operators purely for the purpose of overloading. We can use
> things like (+), (*), (-), (&), and so on. It'd probably be fine to use
> one for dot product.
This looks acceptable as dot product:
x (*) y
48 matches
Mail list logo