Search found 584 matches

by coelurus
Thu 22 Nov, 2007 2:22 pm
Forum: Programming Help
Topic: [C] Type punning acceptable on float?
Replies: 20
Views: 18002

You know what the only correct thing to do is? Profiling.
by coelurus
Wed 21 Nov, 2007 11:20 pm
Forum: Programming Help
Topic: [C] Type punning acceptable on float?
Replies: 20
Views: 18002

C code: #include <stdio.h> int is_negative(float x) { unsigned int *ui = (unsigned int *)&x; return (*ui >> 31); } int main(int argc, char **argv) { printf("%d\n", is_negative(strtod(argv[1], NULL))); return 0; } Compiled to assembler with gcc -O3 -S: .file "main.c" .text .p2...
by coelurus
Tue 20 Nov, 2007 5:52 pm
Forum: Programming Help
Topic: [C] Type punning acceptable on float?
Replies: 20
Views: 18002

Modern compilers inline tiny functions like that.

As is always said around here, try both, they're so ridiculously easy to try anyway. If there's hardly any difference, go for the safe approach (the fp op).
by coelurus
Tue 30 Oct, 2007 8:32 am
Forum: Off Topic
Topic: MS admits Vista is bloatware
Replies: 59
Views: 70596

Hardware accelerated means one uses hardwired routines to replace software routines. That's it. The routines can be small, but still essential. A lot of programs these days are _graphics hardware_ accelerated, but lazy people (the majority, including me when I made a "hardware accelerated geoco...
by coelurus
Mon 29 Oct, 2007 11:10 pm
Forum: Off Topic
Topic: MS admits Vista is bloatware
Replies: 59
Views: 70596

XP is generally (note: very ambiguous term) faster than Vista, if "direct" performance is what you want. If you wanna play games, use XP. If you want to work safely, use Vista. Pick the one for your needs. Personally, I think Vista is like ME, something a bit newer that you really don't ne...
by coelurus
Fri 19 Oct, 2007 8:52 am
Forum: Program Ideas
Topic: Regular Expressions Matching Subroutine
Replies: 5
Views: 12199

There are libraries for the PC which you can port.
by coelurus
Fri 19 Oct, 2007 8:50 am
Forum: Off Topic
Topic: A pretty simple physics problem.
Replies: 7
Views: 8851

Isn't this one of those "hard" exercises you do in junior high school?
by coelurus
Thu 18 Oct, 2007 9:56 am
Forum: Program Ideas
Topic: Regular Expressions Matching Subroutine
Replies: 5
Views: 12199

There are a lot of libraries with source code that handle regexps, just have a look.
by coelurus
Fri 12 Oct, 2007 10:27 am
Forum: Programming Help
Topic: [C]Does anyone know a good timing library?<solved>
Replies: 18
Views: 17240

It isn't, but if you'd chosen that one-liner together with gettimeofday from the start over a month ago, then all would have been working well.

Sry, I'm one of those "as few silly little dependencies as possible" :)
by coelurus
Thu 11 Oct, 2007 9:13 am
Forum: Programming Help
Topic: [C]Does anyone know a good timing library?<solved>
Replies: 18
Views: 17240

You know what? SDL uses timeGetTime in the newest snapshot.
by coelurus
Tue 02 Oct, 2007 12:16 pm
Forum: Off Topic
Topic: Largest Lego product ever. Seriously.
Replies: 19
Views: 24112

I used the good-old string-with-weights method as in cuckoo clocks, which gives, uh, "time-independent uniform forces and pressures on the internals". I never figured out a really, really good escapement thingie, they either were too delicate and unreliable or too coarse which let too much...
by coelurus
Mon 01 Oct, 2007 12:38 pm
Forum: Off Topic
Topic: Largest Lego product ever. Seriously.
Replies: 19
Views: 24112

Sorry no, I haven't had any video-recording devices, it's partially in bits (my creations were lucky if they lasted more than a day) and it's 180km from where I am now. There's a similar robot on youtube ("lego rubik"). The most interesting thing I did was a mechanical pendulum clock, grea...
by coelurus
Sun 30 Sep, 2007 8:19 pm
Forum: Off Topic
Topic: Largest Lego product ever. Seriously.
Replies: 19
Views: 24112

Here one of my creations:
Twister
I must have posted this here before, but it was probably long before one of all historical wipeouts.
by coelurus
Sun 30 Sep, 2007 5:35 am
Forum: General TI Discussion
Topic: I just got this email:
Replies: 16
Views: 29116

What's the point of making Halo out of all the other good potential games suitable for a calc?

EDIT: Oh and I forrgot, something tells my DWedit didn't post this to motivate developers...
by coelurus
Fri 28 Sep, 2007 10:11 am
Forum: Off Topic
Topic: Happy Programmers Day!
Replies: 9
Views: 9914

I have a programmer's day every day.