Build a better /prog/ (C Edition)
1
Name:
Anonymous
2011-12-30 21:51
Add or modify previous entries.
#include <stdlib.h>
#include <stdio.h>
void spoiler(char*);
int main(void) {
char *header = "/prog/ 2.0";
printf("<html><head><title>/polecat kebabs/</title></head><body>");
printf("<span style='font-size: 32;'>");spoiler(header);puts("</span>");
printf("<br />Together, we can build a better "); spoiler("/prog/");
printf("</body></html>");
exit(EXIT_SUCCESS);
}
void spoiler(char *text) {
printf("<span onmouseover=\"this.style.color='#FFFFFF';\" onmouseout=\"this.style.color=this.style.backgroundColor='#000000'\" style='background-color: #000000; color: #000000;'>%s</span>", text);
}
2
Name:
Anonymous
2011-12-30 22:47
void code(const char *text)
{
printf("<code>%s</code>",text);
}
3
Name:
Anonymous
2011-12-30 23:43
void JEWS(const chat JEWS){
printf("JEWS\n");
}
void Blankpost(){
char c = 0;
printf("%c\n", c);
}
4
Name:
Anonymous
2011-12-30 23:53
>>2,3
This code is atrocious and obviously from the same person.
5
Name:
Anonymous
2011-12-30 23:58
void filter_fags(const char *name, const bool trip,
const char *email, const char *post)
{
if(trip) return; //filter fags, we dont want their shit here
//parse post and turn to html
}
6
Name:
Anonymous
2011-12-31 0:18
>>5
/* Use C style comments, please! */
7
Name:
Anonymous
2011-12-31 1:45
>>6
Those are C-style comments
since 1999 .
8
Name:
Anonymous
2011-12-31 2:11
>>7
Those are BCPL-style comments since forever
9
Name:
Anonymous
2011-12-31 3:21
/*
* Please adhere to the java standard
* commenting style, thank you.
*/
10
Name:
Anonymous
2011-12-31 4:07
;;; Get fucked
11
Name:
Anonymous
2011-12-31 5:24
(* real programmer use comments that prevent them from putting a multiplication sign immediately after an opening parenthesis. *)
12
Name:
Anonymous
2011-12-31 5:25
build better dubs
13
Name:
Anonymous
2011-12-31 5:52
>>11
ha. ha. ahahahahahahaha. I sure
do .
14
Name:
Anonymous
2011-12-31 13:25
Damn it you faggots contribute actual code. We're never going to build a better /prog/ arguing over commenting styles.
15
Name:
Anonymous
2011-12-31 13:50
#include <stdio.h>
/*
* routine that checks for dubs in
* post number
*/
int dubs(int post_id)
{
int prev = post_id % 10;
int dubs = post_id / 10 > 0;
while(post_id) {
dubs &= ((post_id % 10) == prev);
prev = post_id % 10;
post_id /= 10;
}
return dubs;
}
16
Name:
Anonymous
2011-12-31 13:56
let's just write something I can nc to
17
Name:
Anonymous
2011-12-31 14:00
>>16
$ cat > 4chan-simulator.sh
while [ 1 ]
do
echo "heinous anus"
done
^D
$ sh 4chan-simulator.sh | nc -l -p 1543
18
Name:
Anonymous
2011-12-31 14:02
>>17
alternately, just do
$ yes anus | nc -l -p 1234
19
Name:
Anonymous
2011-12-31 14:08
:|
20
Name:
Anonymous
2011-12-31 14:26
I'm writing a program to view 4chan text-boards in the tty.
It's called disViewer. I thought about making it only for /prog/ since /prog/ is the only text board I like but I decided to make it work for all text boards.
21
Name:
Anonymous
2011-12-31 14:44
>>20
How does it handle the BBCodes?
22
Name:
Anonymous
2011-12-31 15:30
>>20
[asshole-advice]there's already lynx for that[/asshole-advice]
Newer Posts