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

Huffmanashi No Naku Koro Ni

Name: Cudder !cXCudderUE 2017-03-04 4:12

int kod(int *cnts, int i, int *j, int *k, int nsyms) {
int r;
if(*k > nsyms || i > *j && cnts[*j] < cnts[*k]) {
r = cnts[*j];
cnts[(*j)++] = i;
} else
r = cnts[(*k)++];
return r;
}

int huff(int *cnts, int nsyms) {
int i = 0, j = 0, k = 0;
for(i=0;i<nsyms-1;i++)
cnts[i] = kod(cnts, i, &j, &k, nsyms) + kod(cnts, i, &j, &k, nsyms);
cnts[i] = 2;
j = i-1;
k = j;
while(k) {
while(j > 0 && cnts[j-1] >= k)
j--;
cnts[i--] -= k - j;
cnts[i] = (k - j)*2;
k = j;
}
return nsyms - i;
}

Name: Anonymous 2017-03-04 9:24

Wakizashi hashi-mashi harizomo tomo-nomo. Fuck yourself, weeaboo.

Name: Anonymous 2017-03-04 13:25

stop being a namefag

Name: When the /g/ros cry 2017-03-04 15:53

>>2
When the /g/ros cry

Name: Anonymous 2017-03-06 20:18

Thank you new admin, now I can browse /prog/ again. I love you.
What's with the code tags however not keeping the spaces?

x (0 spaces)
x (1 space)
x (2 spaces)
x (3 spaces)

Name: Steve 2017-03-07 22:42

>>5
looks fine 2 me

Name: Anonymous 2017-04-02 2:32

Is this used in your browser, cudder?

Name: Anonymous 2017-04-03 15:25

All those zeroes are actually octal literals. Think about that.

Name: Anonymous 2017-04-24 12:08

>>8
Proof?

Name: Anonymous 2017-04-24 16:05

>>9
Read the C standard. 0 is an octal-constant.

Name: Anonymous 2017-04-24 16:49

>>8 except
-0 is decimal

Name: Anonymous 2017-04-24 16:52

>>11
That's not a real number

Name: Cudder !cXCudderUE 2017-04-25 0:56

>>11-12
It's the unary negation operator applied to the octal constant 0.

Name: Anonymous 2017-04-25 1:13

I prefer the anal constant 0

Name: Anonymous 2017-04-25 4:16

Oh good Cudder did find this board after all.

Name: Anonymous 2017-04-25 19:50

>>15
This is her old tripcode.

Name: Anonymous 2017-04-25 19:51

Name: Anonymous 2017-04-26 0:13

>>16
No, the MrSatori one is her old tripcode.

Name: Anonymous 2017-05-02 9:40

>>11
That's not true.
Both 0 and -0 are octal.

Name: Anonymous 2017-05-04 22:57

>>3
When /g/ros cry.

Name: Anonymous 2017-05-05 15:49

C is a fractal of bad design. ``cnts'' is an array but ``j'' and ``k'' are pointers to integers and there's no way to tell from the types.

Name: Anonymous 2017-05-05 15:52

>>21
Maybe you'd be able to tell if they were named better.

Name: Anonymous 2017-05-05 15:54

int dgfgDFDhycRERF = 1;

Name: Cudder !cXCudderUE 2017-07-14 3:42

Huffing is easy...

https://svn.apache.org/repos/asf/pdfbox/tags/1.7.0/pdfbox/src/main/java/org/apache/pdfbox/io/ccitt/CCITTFaxG31DDecodeInputStream.java

...but apparently, not when you're a Java programmer. Look at BIT_POS_MASKS and readBit(). :facepalm:

Name: Anonymous 2017-07-14 6:27

>>1
why does your function take a pointer to cunts?

Name: Anonymous 2017-07-16 1:43

>>1
Why are your variable names so compressed?
Also I thought you were joking when you said you use 1 space indentation... You know almost no one does this, right?

Name: Anonymous 2017-07-16 2:28

>>26
Frozenvoid does it too
Or I think he just leaves it all on one line

Name: Cudder !cXCudderUE 2017-07-16 3:16

>>26
You're supposed to focus on the structure, not the names. This is meant to be the complete opposite of the ENTERPRISE BULLSHITE tiringly verbose tripe that gets churned out in bulk by clueless codemonkeys (like >>24) which says a lot without doing much.

One space is sufficient. No "partial" indents (a line is always in one indent level), all the size advantages of tabs combined with the fixed-width-ness of spaces, easy to see the level without multiplying or dividing.

Name: Anonymous 2017-07-16 3:38

>>27
I don't indent code and find the idea ridiculous, but sometimes use editors which add "indentation level"(which i don't fix).

Name: Anonymous 2017-07-16 10:14


// in progress
function doalert(n){

alert(n);

}

// finalized
function doalert(n){
alert(n);
}

Name: Anonymous 2017-07-16 11:53

>>29
I don't indent code and find the idea ridiculous
This is why no one takes you seriously.

Name: Anonymous 2017-07-16 13:55

>>31
I don't write pretty novels. I'm not a code artisan. I don't need a style guide. I don't need your rules about indentation.
All this superfluous mental garbage(tabs vs spaces, one true brace, the right font) is a distraction from actual programming.

Name: Anonymous 2017-07-16 14:19

>>32
indent these dubs

Name: Anonymous 2017-07-16 14:36

Name: Anonymous 2017-07-16 16:06

>>32
You don't need people reading your crap either.

Name: Anonymous 2017-07-16 16:26

Indentation is nothing but an instrument of code oppression created by the so-called ``code artisans'', who believe that the importance of code is determined by their level of indentation.
Break your code free from the oppression of the patriarchic code artisans, comrades! Programmers of the world, unite and stop indenting! All lines of code are equal!

Name: Anonymous 2017-07-16 18:24

Indentation Privilege.

Name: Anonymous 2017-07-17 1:18

>>35
It's too difficult for dumb niggermonkeys to run indent(1), huh?

Name: Anonymous 2017-07-17 2:01

>>38
I don't see how that's going to fix narcissism.

Name: Anonymous 2017-07-17 4:43

>>39
I don't see how that's going to fix autism.

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