Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

What do you code in your free time?

Name: Anonymous 2009-03-20 15:41

I mean, everything has been already done by someone else and I don't think everyone is involved in BIG projects and shit like that.

Name: Anonymous 2009-03-20 15:42

What's the difference between fun() and fun(void) in C?

Name: Anonymous 2009-03-20 15:43

ABC interpreter.

Name: Anonymous 2009-03-20 15:45

>>1
I'm currently working on a C Preprocessor to give to the Anonix project

Name: Anonymous 2009-03-20 15:57

( ゚ ヮ゚) $0.99 iPhone Apps!

Name: Anonymous 2009-03-20 16:25

>>5
Haha, you develop on OSX.

I feel kind of bad about it :(

Name: Anonymous 2009-03-20 16:58

Sex with Leah Culver

Name: Anonymous 2009-03-20 17:03

>>7
Anonymous lies!

Name: Anonymous 2009-03-20 19:06

My last 'project' was a cellular automata implementation in pascal with editing capability.

I'm a noob

Name: Anonymous 2009-03-20 19:46

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

char *bbcode[10] = {
    "o", "spoiler", "aa", "m",
    "sub", "sup", "s", "b", "u", "i"
};

typedef struct stack_t {
    int value;
    struct stack_t *next;
} stack_t;

stack_t *push(int value, stack_t *stack) {
    stack_t *buf;

    if ((buf = malloc(sizeof(stack_t))) == NULL)
        return NULL;

    buf->value = value;
    buf->next = stack;
  
    return buf;
}

stack_t *pop(int *out, stack_t *stack) {
    stack_t *next = NULL;

    if(stack != NULL) {
        *out = stack->value;
        next = stack->next;
        free(stack);
    }
  
    return next;
}

int main(int argc, char **argv) {
    stack_t *stack = NULL;
    int maxcode, arg, pushorpop, code;
    int pushed = 0;

    srand(time(NULL));
    maxcode = sizeof(bbcode)/sizeof(char*);

    if(argc == 1) {
        return -1;
    }

    for(arg = 1; arg < argc; arg++) {
        pushorpop = rand() % 2;
        if(pushed == 0)
            pushorpop = 0;

        if(pushed > 4)
            pushorpop = 1;

        if(pushorpop == 0) {
            code = rand() % maxcode;
            stack = push(code, stack);
            pushed++;
            printf(" [%s]", bbcode[code]);
        } else {
            stack = pop(&code, stack);
            pushed--;
            printf("[/%s] ", bbcode[code]);
        }
        printf("%s", argv[arg]);
    }
    while(pushed > 0) {
        stack = pop(&code, stack);
        pushed--;
        printf("[/%s]", bbcode[code]);
    }
    printf("\n");
    return 0;
}

Name: Anonymous 2009-03-20 19:49

I just finished a web search interface to my anime database.

Name: Anonymous 2009-03-20 19:53

>>10
That's not optimized. It might push the same code twice, causing the unpleasant effect of several words in a row having the same formatting. Please fix it by ensuring that two redundant codes can't exist in the stack at the same time.

Please avoid calling rand() multiple times until you find a suitable code. Moreover, don't call rand() if some overriding condition is met ((pushed == 0) and (pushed > 4) in your code).

Name: Anonymous 2009-03-20 20:02

That's not optimized. It might push the same code twice, causing the unpleasant effect of several words in a row having the same formatting. Please fix it by ensuring that two redundant codes can't exist in the stack at the same time.
how would you handle something like [m]a [aa]b [m]c[/m] d[/aa] e[/m]?

anyway, here's a better one:
/* Copyright (c) 2008 Anonymous
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that you grant this
 * same permission to anyone you distribute it to without any additional
 * restrictions.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <time.h>

int main(int argc, char *argv[]){
 char *stack[argc - 1], *bbcode[10] = {"aa", "b", "i", "m", "o", "s", "spoiler",
   "sub", "sup", "u"};
 size_t stack_size = 1, argv_index = 2;
#ifdef __STRICT_ANSI__
 srandom(time(0));
#else
 srandomdev();
#endif
 if(argc == 1) return -1;
 for(printf("[%s]%s", stack[0] = bbcode[random() % 10], argv[1]);
   argv_index < argc; ++argv_index)
  if(random() % 2 && stack_size)
   printf("[/%s] %s", stack[--stack_size], argv[argv_index]);
  else
   printf(" [%s]%s", stack[stack_size++] = bbcode[random() % 10],
     argv[argv_index]);
 while(stack_size) printf("[/%s]", stack[--stack_size]);
 puts("");
 return 0;
}

Name: Anonymous 2009-03-20 20:09

>>10
>>13
These both suck some long Sussman'.
You really should implement a more probabilistic model rather than just using plain randomness for everything. (i.e.: nest depth of tags effects chance of escaping tags or increasing nest dept, && certain random patterns that have already occured should be more likely to reoccur.

Name: Anonymous 2009-03-20 20:20

You really should implement a more probabilistic model rather than just using plain randomness for everything. (i.e.: nest depth of tags effects chance of escaping tags or increasing nest dept, && certain random patterns that have already occured should be more likely to reoccur.
that's great if you want to get the same five patterns over and over again instead of coming up with new ones.

Name: Anonymous 2009-03-20 20:20

Have you generated your random BBCode today?

Name: Anonymous 2009-03-20 20:27

Yes, indeed. I actually have. Was a great experience.

Name: Anonymous 2009-03-20 20:28

ITT: OPTIMIZING BBCODE GENERATORS THAT TAKE NANOSECONDS TO RUN.

Name: Anonymous 2009-03-20 20:29

I'm glad to hear that. HAND.

Name: Anonymous 2009-03-20 20:33

>>15
...You don't undertand the word 'probabilistic' do you? It does not mean deterministic, it simply means weighted randomness. So you dont end up with shit like >>16

Name: Anonymous 2009-03-20 20:34

>>20
>>16 is weighted.

Name: Anonymous 2009-03-20 20:41

4%20 HOMEY

Ma
rijuana MUST be legalized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:41

HOLY SHIT I LOVE ICECREAM

Marijua
n
a MUST be legalized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:41

GREEEEEEN

Marijuana MUST be legalized.

BBCode MASTERS sm
oke WEED!

Name: Anonymous 2009-03-20 20:41

GREEEEEEN

Marijuana MUST be lega
lized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:43

GREEEEEEN

Marijuana MUST be legalized.

B
BCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:43

GREEEEEEN

Marijuana MUST be legalized.

BBCode MASTERS
smoke WEED!

Name: Anonymous 2009-03-20 20:43

THE NEED FOR WEED

Marijuana MUST be legalized.

BBCode
MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:43

4:20 HOMEY

Mar
ijuana MU
ST
b
e legalized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:43

HOLY SHIT I LOVE ICECREAM

Marijuana MUST be legalized.

BBC
ode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:44

GREEEEEEN

Marijuana
MUST be legalized.

B
BCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:44

4:20 HOMEY

M
arijuana MUST be legalized.

BBCode MASTE
RS smoke WEED!

Name: Anonymous 2009-03-20 20:44

THE NEED FOR WEED

Mar
ijuana MUST be legalized.

BBC
ode M
ASTE
RS smoke WEED!

Name: Anonymous 2009-03-20 20:44

4:20 HOMEY

Marijuana MUST be legalized.

BB
C
ode
M
ASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:44

GREEEEEEN

Mar
ijuana MUST be legalized.

BBCo
de MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:44

GREEEEEEN

Marij
uana MUST be
legalized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:44

HOLY SHIT I LOVE ICECREAM

Marijuana MUST be legalized.

BB
Code MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:44

4:20 HOMEY

Marijua
na
MUST be legalized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:44

GREEEEEEN

Ma
rijuana MUST be legalized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:45

4:20 HOMEY

Ma
rijuana MUST be legalized.

BBCode
MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:45

4:20 HOMEY

Mar
ijuana MUST be legalized.

B
B
Code MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:45

THE NEED FOR WEED

Ma
r
ijuana MUST be legalized.

BBC
ode MASTERS smoke WEED
!

Name: Anonymous 2009-03-20 20:45

4:20 HOMEY

M
ar
ijuana MUST be legalized.

BBC
ode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:45

GREEEEEEN

Marijuana MUST be legalized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:45

HOLY SHIT I LOVE ICECREAM

Marijuana MUST be legalized.

B
B
Code MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:45

GREEEEEEN

Mari
jua
na MUST be legalized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:45

GREEEEEEN

Marijuana MUST be legalized.

B
BCode MA
STERS smoke WEED!

Name: Anonymous 2009-03-20 20:45

THE NEED FOR WEED

M
arijuana
MU
ST be legalized.

BBCode MASTE
RS
smok
e
WEED!

Name: Anonymous 2009-03-20 20:46

4:20 HOMEY

M
ar
ij
uana MUST be
legalized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:46

HOLY SHIT I LOVE ICECREAM

Marijuana MUST be legal
ized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:46

GREEEEEEN

Mar
i
juana MUST be legalized.

B
BCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:46

GREEEEEEN

Marijuana MUST be legalized.

BBCode MASTERS smoke WEED!

Name: Anonymous 2009-03-20 20:46

HOLY SHIT I LOVE ICECREAM

Marijuana MUST be legalized.

BBCode
MA
STERS smoke WEED!

Name: Anonymous 2009-03-20 20:47

>>21
No >>16 looks like utter shit, and if it is weighted it is done very poorly and the algorithm is likely very primitive- Like all the spam in this thread. >>17 on the other hand looks very smooth and well done, if that is computer generated I would be impressed.

Name: Anonymous 2009-03-20 20:48

>>54
Yeah, we get it. You posted >>17.

Name: Anonymous 2009-03-20 20:52

>>55
No, I didn't. I posted >>13 and I doubt >>17 is random generated.
If it is, author I would like to see the code.

Name: Anonymous 2009-03-20 20:56

Honestly I think the completely random generated ones look more aesthetically pleasing than the weighted ones.

Name: Anonymous 2009-03-20 21:18

>>57
You havn't seen or visualized a good weighting algorithm then. It would BBCodify text in a manner similar to a human poster, with pleasing patterns visible i.e, nesting subs to depth 5 and then unnesting while alternating bold and italicized words. I would try, but for the algorithm to be good enough to meet my expectations it would be good enough that I could write a research paper on it, and that would just be a large waste of time when I could design better useful algorithms I will actually get paid to submit to journal instead.

Name: Anonymous 2009-03-20 21:22

>>58
"I could do it... But... I don't have the time. So I only talk shit."

Name: Anonymous 2009-03-20 21:39

>>59
The first half is correct. I don't know where you got the latter half or what relevance it has at all when discussing a theoretical algorithm. If you could please elaborate?
That is, unless IHBT.

Name: Anonymous 2009-03-20 21:40

What's going on here?

Name: Anonymous 2009-03-20 22:14

a b c d e f g h i j k l m n o p q r s t u v w x y z

Name: Anonymous 2009-03-20 22:15

a b c d e f g h i j k l m n o p q r s t u v w x y za b c d e f g h i j k l m n o p q s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z

Name: Anonymous 2009-03-20 22:22

>>63 PIG DISGUSTING

Name: Anonymous 2009-03-20 22:24

PIG DISGUSTING

Name: Anonymous 2009-03-20 22:25

>>1
Custom tools for reverse engineering

Name: Anonymous 2009-03-20 22:27

I just finished a dynamic peer to peer dictionary protocol.

Name: Anonymous 2009-03-20 22:28

The only code I write is for Java homework threads on /prog/.

Name: Anonymous 2009-03-20 23:05

I wrote a program that finds the source url of videos on streaming sites.

I did it so I could download porn. :|

Name: Anonymous 2009-03-20 23:31

>>69

You can do that with a browser.

Name: Anonymous 2009-03-20 23:44

>>70
How?

I'm talking about urls that are intentionally obfuscated.

Name: Anonymous 2009-03-20 23:48

great now look what you've gone and fucking done

Name: Anonymous 2009-03-20 23:55

I wrote a program that torrents new ぶっかけ videos from オラバウト.

Name: Anonymous 2009-03-20 23:59

Anonix.

Name: Anonymous 2009-03-21 0:43

GREEEEEEN

M
arijuana MUST be legalize
d
.

B
BCode MASTERS smoke WEED!

Name: Anonymous 2009-03-30 3:15

bump

Name: Anonymous 2009-03-30 5:13

I contribute to open source computer games

Name: Anonymous 2009-03-30 5:31

i hack anuses .

Name: Anonymous 2009-03-30 12:02

>>77
That's why they still suck so much, with rare exceptions such as Wesnoth and Freeciv which are quite playable.

Name: Anonymous 2010-11-16 2:46

Don't change these.
Name: Email:
Entire Thread Thread List