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

Pages: 1-4041-8081-

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.

Name: Anonymous 2017-07-17 5:46

>>40
I don't see how that's going to fix capitalism.

Name: Anonymous 2017-07-17 6:36

I don't see how that's going to implement diff

Name: Anonymous 2017-07-17 7:06

>>32
I don't think you understand the purpose of indentation very well.
You might think it's meaningless and have learned to get used to it, but at a glance, looking at your code to find something and identify structures becomes difficult. Then when others start reading your code they too will find it very hard to read compared to others' code.

Sure they can run ident(1), but are there really many notable benefits to foregoing indentation? All I can think of is saving file size, but that's a poor argument. Formatting your code should be an effortless part on yourself, and doesn't require you to be a ``code artisan'' to accomplish. Just think of how many people who looked at your code for 5 seconds and in the end just thought you are an amateur Apper without analyzing your techniques indepth.

So don't think it will only affect you. With almost all code people see being well formatted, it's hard to think they'll be ok with formatting some guy's code themselves just because he is kinda narcissistic.

Name: Anonymous 2017-07-17 7:07

>>43
This. dubs.

Name: Anonymous 2017-07-17 8:43

>>43
Benefits of not joining the indentation cult:
1.Lower file sizes
2.More data fits on one screen "The visual field is a scarce UI commodity"
3.Code doesn't get mangled due text filters and processing(indented code like python suffers from it well).
4.Its faster to read:
Reading indented code requires more scrolling and mental processing(comparing visual indentation with logical structure).
5.Its faster to write:
Without superficial indentation rules and policies, code writing naturally flows at the speed of typing out mental concepts(aids "Flow state"). No spacing, no indentation, no distraction: focus is always on code and not the aesthetic form it takes.
6.Its easier to debug:
Indented code error bring little context, often only a single statement.
Non-indented code errors show up as blocks of code.
7.Its terse structure allow to keep more of code in mind at the same time:with indented code you can't see it all due #2

Name: Anonymous 2017-07-17 8:47

>>45
Its faster to read
Its easier to debug
Nigga u dum

Name: Anonymous 2017-07-17 8:51

Name: Anonymous 2017-07-17 9:16

Name: Anonymous 2017-07-17 9:55

>>46
it's FV, what did you expect? he doesn't work on anything big and complex, he's just experimenting with pre-processor macros for fun. you don't need indentation to hack together an apply macro therefore it's useless for FV. the same goes for version control.

Name: Anonymous 2017-07-17 9:58

>>45
Consider the following: An excerpt of anoncoreutils, with indentation modified to mimic your ``Apping'' style. Can you understand how it works and what it does in 10 seconds?

#include <stdio.h>
#include <string.h>

int main(int argc, char **argv) {
int i;
if(argc!=2) {
fprintf(stderr,"usage: %s string\n",argv[0]);
return 1;
}
if(!strcmp(argv[1],"//"))
goto step_6;
if(!argv[1][0])
goto single_dot;
for(i=0;i<strlen(argv[1]);i++)
if(argv[1][i]!='/')
goto notslash;
goto single_slash;
notslash:
for(i=strlen(argv[1])-1;argv[1][i]=='/';i--)
argv[1][i]=0;
if(strrchr(argv[1],'/')) {
for(i=strlen(argv[1])-1;argv[1][i]&&argv[1][i]!='/';i--)
argv[1][i]=0;
step_6:
for(i=strlen(argv[1])-1;argv[1][i]&&argv[1][i]=='/';i--)
argv[1][i]=0;
if(argv[1][0])
printf("%s\n",argv[1]);
else
single_slash: printf("/\n");
} else
single_dot:
printf(".\n");
return 0;
}

Name: Anonymous 2017-07-17 10:05

>>50
Looks fine to me

Name: Anonymous 2017-07-17 10:46

>>50 Thats a waste of space
#include <stdio.h>
#include <string.h>
int main(int argc,char**argv){int i;
if(argc!=2){fprintf(stderr,"usage: %s string\n",argv[0]);return 1;}
if(!strcmp(argv[1],"//")){goto step_6;};
if(!argv[1][0]){goto single_dot;}
for(i=0;i<strlen(argv[1]);i++){if(argv[1][i]!='/')goto notslash;}
goto single_slash;notslash:for(i=strlen(argv[1])-1;argv[1][i]=='/';i--){argv[1][i]=0;}
if(strrchr(argv[1],'/')){for(i=strlen(argv[1])-1;argv[1][i]&&argv[1][i]!='/';i--){argv[1][i]=0;};
step_6:for(i=strlen(argv[1])-1;argv[1][i]&&argv[1][i]=='/';i--){argv[1][i]=0;}
if(argv[1][0]){printf("%s\n",argv[1]);}else{single_slash: printf("/\n");}}else{single_dot:printf(".\n");};return 0;}

Name: Anonymous 2017-07-17 10:53

>>52
Yeah this looks more like his style but without the syntax highlighting

Name: Anonymous 2017-07-17 10:55

Added line height for clarity for those who can't distinguish lines.

#include <stdio.h>

#include <string.h>

int main(int argc,char**argv){int i;

if(argc!=2){fprintf(stderr,"usage: %s string\n",argv[0]);return 1;}

if(!strcmp(argv[1],"//")){goto step_6;};

if(!argv[1][0]){goto single_dot;}

for(i=0;i<strlen(argv[1]);i++){if(argv[1][i]!='/')goto notslash;}

goto single_slash;notslash:for(i=strlen(argv[1])-1;argv[1][i]=='/';i--){argv[1][i]=0;}

if(strrchr(argv[1],'/')){for(i=strlen(argv[1])-1;argv[1][i]&&argv[1][i]!='/';i--){argv[1][i]=0;};

step_6:for(i=strlen(argv[1])-1;argv[1][i]&&argv[1][i]=='/';i--){argv[1][i]=0;}

if(argv[1][0]){printf("%s\n",argv[1]);}else{single_slash: printf("/\n");}

}else{single_dot:printf(".\n");};return 0;}

Name: Anonymous 2017-07-17 11:04

indent
those
dubs

Name: Anonymous 2017-07-17 12:54

>>45
Its faster to read
Its easier to debug

Weird how these are also the arguments for using indentation.
Really makes you think.

Name: Anonymous 2017-07-17 13:36

>>56
What is faster to read, 10 lines of text or 40 lines?

Name: Anonymous 2017-07-17 13:48

>>57
1. strip all newlines
2. paste code into Microsoft Notepad
3. turn off word wrapping

congratulations! you now have one line of text, which will be THE FASTEST to read

Name: Anonymous 2017-07-17 13:48

>>57
Well it's true that 10 lines would be faster to read, then.
Not faster to understand, though.

Name: Anonymous 2017-07-17 14:53

This is quicksort in APL
Q←{1≥≢⍵:⍵ ⋄ S←{⍺⌿⍨⍺ ⍺⍺ ⍵} ⋄ ⍵((∇<S)⍪=S⍪(∇>S))⍵⌷⍨?≢⍵}

Name: Anonymous 2017-07-17 15:20

>>59
..due a lack of mental capacity.

Name: Anonymous 2017-07-17 15:21

>>61
Say whatever you want, FrozenAnus. It doesn't make it true.

Name: Anonymous 2017-07-17 15:30

>>61
is this right? >>49

Name: Anonymous 2017-07-17 15:38

>>63
C macros is only one of my interests. They're probably well known because i like to showcase theoretical stuff from the void.h/void2 headers. I don't actually write programs composed from macros, unless its a demo thing.

Name: Anonymous 2017-07-17 22:28

>>64
>I don't actually write programs
Knew it

Name: Anonymous 2017-07-18 0:38

>>65
Well. Its partially correct.
I don't write "programs" i write apps or utilities. Writing big projects and committing to support them isn't for me.
I prefer to use my time rationally, not being an open source code monkey. see http://void.wikidot.com/effort-reward-curve

Name: Anonymous 2017-07-18 1:10

Write programs that do one thing and do it well.
Write programs to work together.
Write programs to handle text streams, because that is a universal interface.

Name: Anonymous 2017-07-18 10:45

>>66
then stop shitting on things that help immensely when writing big programs.

Name: Anonymous 2017-07-18 13:57

>>68
>big programs
1./prog/riders didn't write anything big(20K+ line of code)
2.Big programs are usually split into small modules.
3.The only case where this could be useful is some huge file like sqlite source amalgamation(which is never edited manually).

Name: Anonymous 2017-07-18 14:23

>>69
Big programs are anything above 15 lines, thanks

Name: Anonymous 2017-07-18 14:27

Never argue with stupid people, they will drag you down to their level and then beat you with experience.

Name: Anonymous 2017-07-18 15:05

>>70

log10(LOC) Type
9+ Enterprise-Class
8-9 Enormous
7-8 Gigantic
6-7 Huge
5-6 Large
4-5 Medium
3-4 Small
2-3 Tiny
1-2 Extra Tiny

Name: Anonymous 2017-07-18 15:14

>>60
Needs to be replaced by emoji and APL will become popular overnight.

Name: Anonymous 2017-07-18 15:31

Name: Anonymous 2017-07-18 15:35

Name: Anonymous 2017-07-18 15:38

>It's estimated that there are 111 billion lines of new software code generated by developers every year,
If they didn't indent the number would be much smaller.

Name: Anonymous 2017-07-18 15:41

>>76
If they didn't indent the number would be much smaller.
Retard.

Name: Anonymous 2017-07-18 15:44

>>76
indent
verb
ɪnˈdɛnt/


Start (a line of text) or position (a block of text) further from the margin than the main part of the text.
``type a paragraph of text and indent the first line''

synonyms: move to the right, move further from the margin, start in from the margin.
``the first line of a paragraph is indented by using the tab key''

Name: Anonymous 2017-07-18 15:48

>>66
An Apper
Wow!

Name: Anonymous 2017-07-18 15:53

>>77,78
Someone salty about their bloated indentation wasting space.

Name: Anonymous 2017-07-18 15:57

>>52
Thats the right choice 11 lines of pure code. Keep up the good work.

Name: Anonymous 2017-07-18 16:01

Adding 20 lines of bloat

#include < stdio.h >
#include < string.h >
int main(int argc, char ** argv) {
int i;
if (argc != 2) {
fprintf(stderr, "usage: %s string\n", argv[0]);
return 1;
}
if (!strcmp(argv[1], "//")) {
goto step_6;
};
if (!argv[1][0]) {
goto single_dot;
}
for (i = 0; i < strlen(argv[1]); i++) {
if (argv[1][i] != '/') goto notslash;
}
goto single_slash;
notslash: for (i = strlen(argv[1]) - 1; argv[1][i] == '/'; i--) {
argv[1][i] = 0;
}
if (strrchr(argv[1], '/')) {
for (i = strlen(argv[1]) - 1; argv[1][i] && argv[1][i] != '/'; i--) {
argv[1][i] = 0;
};
step_6: for (i = strlen(argv[1]) - 1; argv[1][i] && argv[1][i] == '/'; i--) {
argv[1][i] = 0;
}
if (argv[1][0]) {
printf("%s\n", argv[1]);
} else {
single_slash: printf("/\n");
}
} else {
single_dot: printf(".\n");
};
return 0;
}

Name: Anonymous 2017-07-18 16:04

>>82
Disgusting and wasteful.

Name: Anonymous 2017-07-18 16:06

>>80-83
Samefag

Name: Anonymous 2017-07-18 16:07

>>84
Somefag

Name: Anonymous 2017-07-18 16:34

>>87
fagfag

Name: Anonymous 2017-07-18 16:48

>>84-86
Lisp enthusiasts, please do it in your own thread.

Name: Anonymous 2017-07-18 16:49

dubs

Name: Anonymous 2017-07-18 17:22

>>88
These dubs violate the Dubs Code of Conduct rule on racism.

Name: Anonymous 2017-07-18 18:11

>>82
I still can't quite figure out what this program is supposed to be doing.

Name: Anonymous 2017-07-18 18:16

>>90 Its a bloated and inefficient version of dirname

Name: Anonymous 2017-07-18 20:08

For a proper dirname that is 100% compatible with GNU dirname
http://void.wikidot.com/code:dirname-c

Name: Anonymous 2017-07-18 20:13

>>92
ok you made your point with identation. but you didn't need to strip the white space too.

Name: Anonymous 2017-07-18 20:15

>>93 It fits in less space. You can only fit N chars on one line.
If i want to see all of it i'll compact it to fit lines.

Name: Anonymous 2017-07-19 0:12

>>94
You can only fit N chars on one line.
Wrong, I can fit N+1 chars.

Name: Anonymous 2017-07-19 3:30

>>95
I prefer not to take risks and reserve more free space in case of modifications.

Name: Anonymous 2017-07-19 21:05

>>95
I can fit an infinite amount of zero-width chars.

Name: Anonymous 2017-07-20 2:22

>>97 You mean invisible bloat.

Name: Anonymous 2017-07-20 6:03

>>99 check my visible dubs FrozenAnus

Name: Anonymous 2017-07-20 6:11

>>99
So where are they? Can't see anything.

Name: Anonymous 2017-07-20 6:17

theyr'e here: >>99. and also there: >>100

Name: Anonymous 2017-07-20 6:19

>>101
I don't see anything out of norm.

Name: Anonymous 2017-07-20 6:21

>>102
you're a dubs-blind mental midget. or maybe a turd-pusher. or maybe a STACKBOI RETOID. one of those.

Name: Anonymous 2017-07-20 6:24

>>103
Your ableist mentality is disgusting. Though, i'm not blimd, my vision is fine and i don't suffer from mental deficiencies.

Name: Anonymous 2017-07-20 17:25

huffmanchikaeri!!!

Name: Anonymous 2017-09-13 0:29

huffmaning paint

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