First at all sorry for my english.
I've tried to build any binding of sfml in a 32-bit machine with archlinux.
My problem with dsfml2 is similar to this
http://www.digitalmars.com/d/archives/digitalmars/D/learn/Buliding_DSFML2_64-bit_Linux_25694.html.
After installing mingw32-pthreads (what i don'
On 09/20/2011 10:51 PM, Jonathan M Davis wrote:
On Wednesday, September 21, 2011 04:40:34 Cheng Wei wrote:
Thanks a lot.
Weird. It is not in the library reference in http://www.d-programming-
language.org/, but it is in the library reference in digitalmars.com. I
throught the previous one was th
Hi Y'all!! Just as a note, I am new to the news group, but slightly less
new to D =)
Back on topic:
I am unable to get multiple version specifications to work (from the
website)
sometihng like:
version (foo) {
version = bar;
version = baz;
}
version (bar) {
... codes 'n' stuff
}
ve
Great answer ! Thank you very much, it answered almost everything !
But what about, in the exemple you gave me (which is great by the way)
if foo as parameters ? Those parameters are passed on the stack by copy
to the function, and then, copied to the heap (resulting in two copies) ?
Le 21/09
Daniel Murphy:
> It's a bug, the compiler shouldn't be inserting a cast when the value
> implicitly converts. It's also a bug when the compiler tries to optimise
> away the variable to a literal when passing by reference, I've got a patch
> for this I haven't written up yet.
http://d.puremag
On Wed, 21 Sep 2011 18:32:49 +0200, deadalnix wrote:
D has a wonderfull feature named delegate. Delegate can acess local
data, thus would be dangerous if thoses data were on the stack. For what
I understand, when a delegate can access the local data of a function,
those data are set on the
On 21.09.2011 19:12, Christophe Travert wrote:
Nice. It is better with gdc linux 64bits too. I wanted to avoid
conditional expressions like ?: but it's actually slightly faster that
way.
It is not compiled in as conditional jump.
> Here is a more readable and a bit faster version on dmd windows:
>
> size_t utfCount(string text)
> {
> size_t n = 0;
> for (uint i=0; i n += ((text[i]>>6)^0b10)? 1: 0;
> return n;
> }
Nice. It is better with gdc linux 64bits too. I wanted to avoid
conditional expressi
On 21.09.2011 18:47, Christophe wrote:
Actually, I don't buy it. I guess the reason it's faster is that it
doesn't check if the codepoint is valid.
Why should it ? The documentation of std.utf.count says the string must
be validly encoded, not that it will enforce that it is.
Checking a string
On 21.09.2011 01:57, Christophe wrote:
size_t myCount(string text)
{
size_t n = text.length;
for (uint i=0; i>6;
n -= (s>>1) - ((s+1)>>2);
}
return n;
}
Here is a more readable and a bit faster version on dmd windows:
size_t utfCount(string text)
{
size_t n = 0;
D has a wonderfull feature named delegate. Delegate can acess local
data, thus would be dangerous if thoses data were on the stack. For what
I understand, when a delegate can access the local data of a function,
those data are set on the heap instead of the stack, resulting on a
slower function
> Actually, I don't buy it. I guess the reason it's faster is that it
> doesn't check if the codepoint is valid.
Why should it ? The documentation of std.utf.count says the string must
be validly encoded, not that it will enforce that it is.
Checking a string is valid everytime you use it would
On 2011-09-21 13:59, Andrej Mitrovic wrote:
On 9/21/11, Jacob Carlborg wrote:
Have a look at: http://d-programming-language.org/templates-revisited.html
Right, but as I've said conv.to works at compile-time so that's
unnecessary. Maybe adding a note there about this would be nice, so
people d
On 09/21/2011 12:37 PM, Dmitry Olshansky wrote:
On 21.09.2011 4:04, Timon Gehr wrote:
On 09/21/2011 01:57 AM, Christophe wrote:
"Jonathan M Davis" , dans le message (digitalmars.D.learn:29637), a
écrit :
On Tuesday, September 20, 2011 14:43 Andrej Mitrovic wrote:
On 9/20/11, Jonathan M Davis
On 09/21/2011 02:15 AM, Christophe wrote:
Timon Gehr , dans le message (digitalmars.D.learn:29641), a écrit :
Last point: WalkLength is not optimized for strings.
std.utf.count should be.
This short implementation of count was 3 to 8 times faster than
walkLength is a simple benchmark:
size_t m
On 9/21/11, Jacob Carlborg wrote:
> Have a look at: http://d-programming-language.org/templates-revisited.html
Right, but as I've said conv.to works at compile-time so that's
unnecessary. Maybe adding a note there about this would be nice, so
people don't spend time reimplementing common compile-
On 21.09.2011 4:04, Timon Gehr wrote:
On 09/21/2011 01:57 AM, Christophe wrote:
"Jonathan M Davis" , dans le message (digitalmars.D.learn:29637), a
écrit :
On Tuesday, September 20, 2011 14:43 Andrej Mitrovic wrote:
On 9/20/11, Jonathan M Davis wrote:
Or std.range.walkLength. I don't know why
17 matches
Mail list logo