If you're going to try and BS me that the autism prevalence was actually 1 in 50 back in 1970 too, but only 1 in 200 was diagnosed at the time... well, you're just making stuff up, with no factual evidence to support your argument.
thenewinquiry.com
Is that a typo? What's coyot?actually what im trying to say is that im coyot
sosry,, harbd to t ype with pawbsIs that a typo? What's coyot?![]()
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <curses.h>
int main() {
fcntl(0, F_SETFL, O_NONBLOCK);
initscr();
noecho();
curs_set(0);
int y = 0;
int x = 0;
int ymax = 0;
int xmax = 0;
char key;
getmaxyx(stdscr, ymax, xmax);
xmax -= 5;
while ((key = getch()) != 'q') {
y = rand() % ymax;
x = rand() % xmax;
mvprintw(y, x, "penis");
refresh();
sleep(1);
}
endwin();
return 0;
}
this unfortunately suffers from modulo bias. you need to either retry the rand() call until it's below the threshold or do a change of radix on the RNG bytestreami should work with ncurses more often, so here's a program that'll just print "penis" on a random spot of your screen every second
C:y = rand() % ymax; x = rand() % xmax;
i guess this could be good for testing screen burn-in, at least : )
it isn't a problem with the % operator specifically, it's only in combination with an RNG.rand()%3 does not produce the numbers between 0 and 2 with equal probability!
When rand() returns 0, 3, 6, or 9, rand()%3 == 0. Therefore, P(0) = 4/11
When rand() returns 1, 4, 7, or 10, rand()%3 == 1. Therefore, P(1) = 4/11
When rand() returns 2, 5, or 8, rand()%3 == 2. Therefore, P(2) = 3/11
rand() % 5 is not "a bytestream modulo 5" but more of "an infinite sequence of numbers in base 5". (because mathematicians love terminology, "base" and "radix" mean the same thing)fuck, i guess that explains why it actually produces the same pattern every time i launch the program, my RNG isn't Rit isn't a problem with the % operator specifically, it's only in combination with an RNG.
oh wow, not sure if i did that before when learning about randomness in programminga change-of-radix would be to recognize that what you want out ofrand() % 5is not "a bytestream modulo 5" but more of "an infinite sequence of numbers in base 5". (because mathematicians love terminology, "base" and "radix" mean the same thing)
nah thats because youre not seeding rand(). the modulo bias means it won't evenly cover the screen.fuck, i guess that explains why it actually produces the same pattern every time i launch the program, my RNG isn't R
oh wow, not sure if i did that before when learning about randomness in programming
if youre testing for burn-in you'll burn-in the spots unevenly!i see, well why would i want it to evenly cover the screen, it'll eventually get filled with "penis"es anyway
our take is that we just want our useless scripts to be uselessly correctfair enough, not what i'm doing here tho' xD
good stuffCode:10 print "This computer is hacked!" 20 goto 20
fair enoughour take is that we just want our useless scripts to be uselessly correct
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <curses.h>
int main() {
// make getch() non-blocking
fcntl(0, F_SETFL, O_NONBLOCK);
// initialize our screen:
// do not show keypresses,
// and hide the cursor
initscr();
noecho();
curs_set(0);
int y = 0; // vertical position
int x = 0; // horizontal position
int ymax = 0; // vertical boundary
int xmax = 0; // horizontal boundary
// get how far we can print our "stars"
getmaxyx(stdscr, ymax, xmax);
// register the keypresses
char key;
// but for now, all we can do is
// quit the thing
while ((key = getch()) != 'q') {
y = random() % ymax;
x = random() % xmax;
mvprintw(y, x, "."); // <- "star"
// gotta do this twice so
// it eventually clears a
// spot that's been marked
y = random() % ymax;
x = random() % xmax;
// make the "clear" block
// 4x as big tho', so that
// it doesn't look too dense
mvprintw(y, x, " ");
mvprintw(y + 1, x, " ");
refresh();
// should this be configurable?
usleep(2000);
}
// and we're done
endwin();
return 0;
}
To quote a famous American Nobel Prize Winner, yes, we can. We've had arbitrary precision calculators for a long time.For example, i cannot calculate a googol plus a googol.
$ bc
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000+1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
20000000000000000000000000000000000000000000000000000000000000000000\
00000000000000000000000000000000000000000000000000000000000