On 2011-08-03 20:36, Andrej Mitrovic wrote:
On 8/3/11, Jacob Carlborg wrote:
Why would you want to slow down framerate?
Because the examples were written in the 90s and CPUs and graphic
cards are so fast these days that the old code runs at an enormous
framerate.
I would say that the correc
"Andrej Mitrovic" wrote in message
news:mailman.2097.1312408853.14074.digitalmars-d-le...@puremagic.com...
>I liked QLive before they forced 30 second commercials on server joins
> for non-subscribers. :(
>
> It was cool being able to casually browse to other tabs, then going
> back to qlive and
I liked QLive before they forced 30 second commercials on server joins
for non-subscribers. :(
It was cool being able to casually browse to other tabs, then going
back to qlive and finding a game.
UT for example had an integrated IRC client, but people preferred
using mIRC and having a ut://123.1
"Nick Sabalausky" wrote in message
news:j1cb3a$2qe7$1...@digitalmars.com...
>
> I mean this is the stupid motherfuck industry that's spent the last ten
> years completely ignoring who they're *supposed* to be (***VIDEOGAME***
> developers) and instead running around as a bunch of goddamn
> gra
"Peter Alexander" wrote in message
news:j1asck$81d$1...@digitalmars.com...
>
> The games industry has been crying out for something like NaCl for a long
> time. It is exactly what we want:
>
> - Ability to launch games within browser without a plugin download
> - Platform independent ABI
> - No
On 8/3/11, Andrej Mitrovic wrote:
> if ((t - t_prev).usecs > (1_000_000.0 / FPS))
> {
> t_prev = t;
> DrawGLScene();
> }
>
> SwapBuffers(hDC);
My mistake here, SwapBuffers belongs inside the if body, there's an
unrelated keyboard bug that made me push it there but
On 03.08.2011 22:26, simendsjo wrote:
On 03.08.2011 19:15, Jonathan M Davis wrote:
On 03.08.2011 18:18, Jonathan M Davis wrote:
On Thursday 04 August 2011 00:27:12 Mike Parker wrote:
On 8/3/2011 11:23 PM, simendsjo wrote:
On 03.08.2011 15:49, bearophile wrote:
simendsjo:
void main() {
asser
On Wed, 03 Aug 2011 14:26:54 -0400, simendsjo wrote:
Schveighoffer also states it is as designed.
But it really doesn't behave as one (at least I) would expect.
So in essence (as bearophile says), "is null" should not be used on
arrays.
I was bitten by a bug because of this, and used "" int
> On 03.08.2011 19:15, Jonathan M Davis wrote:
> >> On 03.08.2011 18:18, Jonathan M Davis wrote:
> >>> On Thursday 04 August 2011 00:27:12 Mike Parker wrote:
> On 8/3/2011 11:23 PM, simendsjo wrote:
> > On 03.08.2011 15:49, bearophile wrote:
> >> simendsjo:
> >>> void main() {
> >>
> On Wed, 03 Aug 2011 06:35:08 -0400, simendsjo wrote:
> > void main() {
> >
> > assert(is(typeof("") == typeof("".idup))); // both is
> >
> > immutable(char)[]
> >
> > assert("" !is null);
> > assert("".idup !is null); // fails - s is null. Why?
> >
> > }
>
> An empty string manifest constan
On Wed, 03 Aug 2011 13:42:34 -0400, Andrej Mitrovic
wrote:
That could be the reason. I'm testing on Windows.
Windows only supports millisecond resolution.
A valid solution to this is probably to have anything > 0 and < 1 ms sleep
for at least 1ms. Or maybe it can round up to the next ms
On 8/3/11, Jacob Carlborg wrote:
> Why would you want to slow down framerate?
Because the examples were written in the 90s and CPUs and graphic
cards are so fast these days that the old code runs at an enormous
framerate.
Anyway, after a bit of googling I've found a solution:
enum float FPS = 6
On 03.08.2011 19:15, Jonathan M Davis wrote:
On 03.08.2011 18:18, Jonathan M Davis wrote:
On Thursday 04 August 2011 00:27:12 Mike Parker wrote:
On 8/3/2011 11:23 PM, simendsjo wrote:
On 03.08.2011 15:49, bearophile wrote:
simendsjo:
void main() {
assert(is(typeof("") == typeof("".idup))); /
On 2011-08-03 19:42, Andrej Mitrovic wrote:
That could be the reason. I'm testing on Windows.
I was using sleep() as a quick hack around slowing down the framerate
of an OpenGL display. There are better way to do this but I didn't
have time to find a proper solution yet.
Why would you want to
That could be the reason. I'm testing on Windows.
I was using sleep() as a quick hack around slowing down the framerate
of an OpenGL display. There are better way to do this but I didn't
have time to find a proper solution yet.
On Wed, 03 Aug 2011 13:14:50 -0400, Andrej Mitrovic
wrote:
Take a look at this:
import std.stdio;
import core.thread;
void main()
{
foreach (x; 0 .. 1000)
{
Thread.sleep(dur!("usecs")(999));
writeln(x);
}
foreach (x; 0 .. 1000)
{
Thread.sleep(dur
On Wed, 03 Aug 2011 06:35:08 -0400, simendsjo wrote:
void main() {
assert(is(typeof("") == typeof("".idup))); // both is
immutable(char)[]
assert("" !is null);
assert("".idup !is null); // fails - s is null. Why?
}
An empty string manifest constant (i.e. string literal
> On 03.08.2011 18:18, Jonathan M Davis wrote:
> > On Thursday 04 August 2011 00:27:12 Mike Parker wrote:
> >> On 8/3/2011 11:23 PM, simendsjo wrote:
> >>> On 03.08.2011 15:49, bearophile wrote:
> simendsjo:
> > void main() {
> > assert(is(typeof("") == typeof("".idup))); // both is
>
s/sleep while/sleep value
Take a look at this:
import std.stdio;
import core.thread;
void main()
{
foreach (x; 0 .. 1000)
{
Thread.sleep(dur!("usecs")(999));
writeln(x);
}
foreach (x; 0 .. 1000)
{
Thread.sleep(dur!("usecs")(1000));
writeln(x);
}
}
Compile and run i
On 03.08.2011 18:18, Jonathan M Davis wrote:
On Thursday 04 August 2011 00:27:12 Mike Parker wrote:
On 8/3/2011 11:23 PM, simendsjo wrote:
On 03.08.2011 15:49, bearophile wrote:
simendsjo:
void main() {
assert(is(typeof("") == typeof("".idup))); // both is
immutable(char)[]
assert("" !is nul
On 3/08/2011 2:32, Johann MacDonagh wrote:
On 8/2/2011 8:17 PM, Stijn Herreman wrote:
std.conv does not support conversion from a hexadecimal string to an
integer. Is there a technical reason for this limitation?
This is the best I could do, can it be improved still?
int i = to!int(parse!float(
On Thursday 04 August 2011 00:27:12 Mike Parker wrote:
> On 8/3/2011 11:23 PM, simendsjo wrote:
> > On 03.08.2011 15:49, bearophile wrote:
> >> simendsjo:
> >>> void main() {
> >>> assert(is(typeof("") == typeof("".idup))); // both is
> >>> immutable(char)[]
> >>>
> >>> assert("" !is null);
> >>>
Peter Alexander wrote:
> If D were usable in NaCl that would be a huge selling point for the
> language.
Well, let's set aside my personal things and see how this might be
done.
Based on what I've read so far, it actually sounds easy enough, codegen
wise.
It might be possible to drop gdc into th
On 8/3/2011 11:23 PM, simendsjo wrote:
On 03.08.2011 15:49, bearophile wrote:
simendsjo:
void main() {
assert(is(typeof("") == typeof("".idup))); // both is immutable(char)[]
assert("" !is null);
assert("".idup !is null); // fails - s is null. Why?
}
I think someone has even suggested to st
On 8/3/11 4:07 PM, Magnus Lie Hetland wrote:
I upgraded from OS X Snow Leopard to Lion recently (on a 32-bit iMac),
and when I tried to run my D code afterward, I suddenly ran into all
kinds of interesting problems (lots of failed assertions in my tests,
and bus errors in my actual runs...).
Th
On 03.08.2011 15:49, bearophile wrote:
simendsjo:
void main() {
assert(is(typeof("") == typeof("".idup))); // both is immutable(char)[]
assert("" !is null);
assert("".idup !is null); // fails - s is null. Why?
}
I think someone has even suggested to statically forbid "
Note that an explicit call to GC.collect isn't necessary. Whenever
collection occurs, the collectors seems rather indiscriminate,
collecting things it shouldn't, resulting in bus errors. When I disable
the GC, my code runs just fine. (My production code, that is. There are
still mysterious, pro
I upgraded from OS X Snow Leopard to Lion recently (on a 32-bit iMac),
and when I tried to run my D code afterward, I suddenly ran into all
kinds of interesting problems (lots of failed assertions in my tests,
and bus errors in my actual runs...). Still cleaning stuff up, but I've
isolated at l
simendsjo:
> void main() {
> assert(is(typeof("") == typeof("".idup))); // both is immutable(char)[]
>
> assert("" !is null);
> assert("".idup !is null); // fails - s is null. Why?
> }
I think someone has even suggested to statically forbid "is null" on strings :-)
Bye,
bear
On 2011-08-03 09:34, Pelle wrote:
On Wed, 03 Aug 2011 08:29:09 +0200, Jacob Carlborg wrote:
Yes, convert the first code point to a wchar and then throw if there's
more the one character in the string.
Not tested, and I might be wrong, but 'to!' should work between dchar
and wchar, no?
wchar
On 2011-08-03 08:38, Jonathan M Davis wrote:
On Wednesday 03 August 2011 08:29:09 Jacob Carlborg wrote:
On 2011-08-02 19:51, Jonathan M Davis wrote:
I tried to convert a string into a wchar, but that didn't compile
because of this template constraint:
https://github.com/D-Programming-Language/
void main() {
assert(is(typeof("") == typeof("".idup))); // both is immutable(char)[]
assert("" !is null);
assert("".idup !is null); // fails - s is null. Why?
}
On 03.08.2011 12:01, Jonathan M Davis wrote:
On Wednesday 03 August 2011 11:44:27 simendsjo wrote:
On 03.08.2011 10:52, Jonathan M Davis wrote:
On Wednesday 03 August 2011 10:37:58 simendsjo wrote:
I have a struct with a private member that is only ever accessed
through
a single property metho
On Wednesday 03 August 2011 12:00:18 simendsjo wrote:
> On 03.08.2011 11:44, simendsjo wrote:
> > On 03.08.2011 10:52, Jonathan M Davis wrote:
> >> On Wednesday 03 August 2011 10:37:58 simendsjo wrote:
> >>> I have a struct with a private member that is only ever accessed
> >>> through a single pro
On 03.08.2011 11:44, simendsjo wrote:
On 03.08.2011 10:52, Jonathan M Davis wrote:
On Wednesday 03 August 2011 10:37:58 simendsjo wrote:
I have a struct with a private member that is only ever accessed through
a single property method - even from within the struct.
As this property fills the va
On Wednesday 03 August 2011 11:44:27 simendsjo wrote:
> On 03.08.2011 10:52, Jonathan M Davis wrote:
> > On Wednesday 03 August 2011 10:37:58 simendsjo wrote:
> >> I have a struct with a private member that is only ever accessed
> >> through
> >> a single property method - even from within the stru
On 03.08.2011 10:52, Jonathan M Davis wrote:
On Wednesday 03 August 2011 10:37:58 simendsjo wrote:
I have a struct with a private member that is only ever accessed through
a single property method - even from within the struct.
As this property fills the value on the first access, it cannot be
i
On Wednesday 03 August 2011 10:37:58 simendsjo wrote:
> I have a struct with a private member that is only ever accessed through
> a single property method - even from within the struct.
> As this property fills the value on the first access, it cannot be
> immutable, and as such, none of the many
I have a struct with a private member that is only ever accessed through
a single property method - even from within the struct.
As this property fills the value on the first access, it cannot be
immutable, and as such, none of the many methods accessing this property
can be immutable methods.
On Wednesday 03 August 2011 01:02:02 Jonathan M Davis wrote:
> On Wednesday 03 August 2011 09:34:53 Pelle wrote:
> > On Wed, 03 Aug 2011 08:29:09 +0200, Jacob Carlborg wrote:
> > > Yes, convert the first code point to a wchar and then throw if
> > > there's
> > > more the one character in the stri
On Wednesday 03 August 2011 09:34:53 Pelle wrote:
> On Wed, 03 Aug 2011 08:29:09 +0200, Jacob Carlborg wrote:
> > Yes, convert the first code point to a wchar and then throw if there's
> > more the one character in the string.
>
> Not tested, and I might be wrong, but 'to!' should work between dc
On Wed, 03 Aug 2011 08:29:09 +0200, Jacob Carlborg wrote:
Yes, convert the first code point to a wchar and then throw if there's
more the one character in the string.
Not tested, and I might be wrong, but 'to!' should work between dchar and
wchar, no?
wchar to_wchar(string s) {
auto
On 2/08/11 2:24 AM, Adam Ruppe wrote:
From what I can tell, it's Google's alternative to Flash; they want
to make crappy games on it.
Consider that the first thing they ported to it, again, just like
their javascript nonsense, was Quake. (I think Google loves
Javascript too much to let it go an
44 matches
Mail list logo