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

suckless unix tools

Name: Anonymous 2015-04-02 21:41

Name: Anonymous 2015-04-27 19:28

118
Your ignorance is great, sir. Look at util.h.
I suggest you stop whining like a little bitch and get to fucking work, you sloth!

Name: Anonymous 2015-04-27 19:33

I'm from sucklless and i wanted to say: HATE YOU FUCKERS SHIT IM SO BETTER THAN YOU ALL

Name: Anonymous 2015-04-27 19:54

>>121
util.h
Heh, that's just void.h renamed.

Name: Anonymous 2015-04-28 2:54

which which

Name: Cudder !cXCudderUE 2015-04-28 3:34

>>121
Why the fuck should I, if it's possible to write a self-contained, POSIX-compliant implementation of echo without anything but the standard library? Note that the one in >>12 is completely public-domain, as is the rest of ACU, so they could've just copied its direct simplicity.

I have a feeling this is just going to turn into another GNUish project like gnulib/libiberty/all that other shit. You are in a maze of twisty little dependencies, all alike...

This is certainly not in the spirit of ACU. I've already contributed enough in the form of ACU, if you don't want to make use of it and reinvent your own bastardised version of POSIX, then best of luck, gentlemen.

Name: Anonymous 2015-04-28 3:38

>>125
POSIX-compliant
Disgusting!

Name: Anonymous 2015-04-28 4:02

>>125
It's good to have such a maze of dependencies. It makes it easier to get users to install more of your stuff, and much harder to separate one thing from another. Same reason why GCC internals were such a mess: it prevented proprietary developers from stealing it and making new front-end language parsers or back end generators without paying the GNU Tax (your freedom from 1000 lines of license comments in every file). Genius, really.

I prefer Windows' echo though. A simple echo off will silence all echos until you turn them back on. Convenient.

Name: Anonymous 2015-04-28 8:30

>>109
I find the preponderance of static globals rather disheartening.

Name: Cudder !cXCudderUE 2015-04-28 9:50

>>126
>>127
The goal of ACU is a set of simple, self-contained standard utilities that anyone with a reasonably POSIX-compliant system could pick and choose, and compile without any further dependencies. Public-domain and anonymously contributed (I did say I started the project and wrote some of them, but you don't know which ones, and there are no names at all in the package), free for anyone to use however they want.

This suckmore is going in the opposite direction. Not public-domain, not standalone, not anonymous.

Name: Anonymous 2015-04-28 11:04

>>129
MIT/X (= ISC) is as close to public domain as possible. Additionally, there are many states who don't even ack the existence of public domain.
Which dependencies are there apart from libc in suckless base? I read the code and found none.
You are only anonymous because your face is ugly.

Name: Anonymous 2015-04-28 11:21

>>129
you're an absolute joke kid, shut up

Name: Anonymous 2015-04-28 15:45

>>129
Since when is it bad to put common functions used by the many tools in their own .c files? That's what libutil and libutf are. They make sure there's no unnecessary duplication of functions over the many different tools.
But you wouldn't know that, since your attempt with ACU was absolutely superficial and the scarce tools you implemented probably didn't have common functions.
Get lost, kid.
You are all talk and no action. You never finishes anything you start.

Name: Anonymous 2015-04-28 20:29

1. put the code into a separate library
2. statically link that library in each binary it's used

fucking LOL

suckless logic is almost the same as women logic (utterly retarded)

Name: Anonymous 2015-04-28 20:35

suckless hello world implementation:
#include "util.h"
int main() {
print_hello();
}

LOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOL

Name: Anonymous 2015-04-28 22:38

Wow, check out this putword implementation
/* See LICENSE file for copyright and license details. */
#include <stdio.h>

#include "../util.h"

void
putword(FILE *fp, const char *s)
{
static int first = 1;

if (!first)
fputc(' ', fp);

fputs(s, fp);
first = 0;
}

Name: Anonymous 2015-04-29 3:53

Me thinks >>130-132 are the same.

Name: Anonymous 2015-04-29 3:54

Me thinks >>133-135 are the same.

Name: Anonymous 2015-04-29 7:38

>>135
Weird function, seems esoteric and tied to some particular code. It's not even reentrant!

Name: Anonymous 2015-04-29 7:59

>>137
I admit, you are correct. But that's just because there is not edit-button.

Name: Cudder !cXCudderUE 2015-04-29 11:52

>>132
If anything the amount of extra space you're taking up in the symbol table with an additional (imported) function call and the code of this >>135 absolutely trivially stupid function is far more than just integrating the bloody thing into the source. It is literally a compare with an existing variable and a conditional function call, which you can't do if you decide to pull it out separately so you have to make an extra fucking variable THAT IS ONLY EVER USED ONCE! Instead you have to go through the motions of passing parameters and register saving/restoring and all that stupid shit that compilers do when they call functions.

Why don't you refactor all the for loops out into their own function too? Or all the if statements? After all, they are "duplicated code". This is near that level of retardedness.

You've also not propagated errors correctly... so it is a FAIL!

Name: Cudder !cXCudderUE 2015-04-29 11:57

...and your stupid function call bloat (5 bytes + import table + register save/return + ...) turns into a single 2-byte jump instruction if we use the power of goto:

goto loopin;
while(i<argc) {
ret|=(fputc(' ',stdout)==EOF);
loopin:
ret|=(fputs(argv[i++], stdout)==EOF);
}


I don't think I wrote the original ACU echo... if I did, it would look more like this.

Name: sin 2015-04-29 13:13

Your work inspires me.

Name: FRIGN 2015-04-29 16:16

>>140

Hey Cudder,

If anything the amount of extra space you're taking up in the symbol
table with an additional (imported) function call and the code of the
putword function, for example, absolutely trivially stupid function is
far more than just integrating the bloody thing into the source. It is
literally a compare with an existing variable and a conditional
function call, which you can't do if you decide to pull it out
separately so you have to make an extra fucking variable THAT IS ONLY
EVER USED ONCE! Instead you have to go through the motions of passing
parameters and register saving/restoring and all that stupid shit that
compilers do when they call functions.

It is one thing when your ACU project is slammed on some message board
on the Interwebs, it's another when you start "criticizing" another
project on false grounds.
I'll give you a small hint: The symbol table does not matter too much
in statically linked applications (and that's what's supposed to happen)
and libutil is not dynamically linked into the binaries.
If the compiler detects a function to be "trivial", it will inline it
automatically. I can understand the motivation to do that manually to
optimize the code, but premature optimizations are the first step
towards broken and unmaintainable, chaotic code (look at ACU).

Why don't you refactor all the for loops out into their own function
too? Or all the if statements? After all, they are "duplicated code".
This is near that level of retardedness.

Check out GNU coreutils if you like that.

You've also not propagated errors correctly... so it is a FAIL!

Where?

Cheers

Name: Anonymous 2015-04-29 16:35

>>143
broken and unmaintainable, chaotic code (look at ACU).
ハハハ/ \ / \ / \

Name: Cudder !cXCudderUE 2015-04-29 16:37

>>143
The symbol table does not matter too much in statically linked applications (and that's what's supposed to happen)
Oh $deity... :facepalm:

So you do all that work of extracting the function to avoid "duplicate code"... just so the compiler can put it back the way it should've been written in the first place!? WTF.

I can understand the motivation to do that manually to
optimize the code
It's about optimising for efficiency and readability. By extracting that function you have required the reader to know what that function does... when she finds out, it happens to be something inanely trivial... and you're doing it in one of the most trivial of utilities.

premature optimizations
You're making premature pessimisations instead.

broken and unmaintainable, chaotic code (look at ACU).
Using big words like "unmaintainable" and "chaotic" does not help your argument. The ACU echo does not require anyone with familiarity with the POSIX interface to read more than a single file to figure out what it does.

Where?
Figure it out yourself if you think you're so smart.

Name: Anonymous 2015-04-29 17:03

ACU is indeed superior: http://sprunge.us/BcDT

That's a handrolled dirname(3) implementation that nobody can read. I guess using the standard dirname is overkill here.

I particularly enjoy the step_6 label.

Name: Anonymous 2015-04-29 17:15

>>146
step_6:
//i inits with length of argument 1(directory) = last letter of dirname
//if (current letter of dirname is not NULL(superfluous) and is '/'(slash separator ) decrement i at end of loop
for(i=strlen(argv[1])-1;argv[1][i]&&argv[1][i]=='/';i--)
//set current letter to NULL(0) truncating the string
argv[1][i]=0;
if(argv[1][0])//if first letter isn't NULL
printf("%s\n",argv[1]);//print dirname
else
single_slash: printf("/\n");

Name: Anonymous 2015-04-29 18:39

>>147
Faggot
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");

Name: Anonymous 2015-04-29 18:49

puts(dirname(argv[1]));

Name: Anonymous 2015-04-29 18:51

BLOAAAAT

Name: Anonymous 2015-04-29 18:53

using things like for loops and if when the full power of GOTO is available to you.

I can't stand bloatprogrammers that use bloat languages like C>

Name: Anonymous 2015-04-29 19:29

>>151
Whom are you quoting?

Name: Anonymous 2015-04-29 19:39

>>151
back to jp with you

Name: Anonymous 2015-04-29 20:05

Name: Anonymous 2015-04-29 20:06

>>153
What is a ``jp''?

Name: Anonymous 2015-04-29 21:13

>>155
It's an abbreviation for Japan.

Name: Anonymous 2015-04-29 21:17

>>156
But how could I go back to Japan if I've never been there? Is >>153-hime retarded?

Name: Anonymous 2015-04-29 23:20

le pretending not to understand trole

Name: Anonymous 2015-04-30 2:21

>>143
Your post was friendly, beginning with in an innocent Hey Cudder and ending with a cheers. But in between the key presses that emanated that text your blood was pumping. Your face was red. Your eyes were focused and your fingers moved with dedicated purpose. When you read cudder-sama's post, something within you broke. Something precious. Your investment in your project and your ego as a eipc coder was threatened. It clicked and you had to retaliate towards the psychological threat. Level it to the ground with a well prepared post. You composed it. You kept it professional. But between the lines, you delivered the attacks that your wounded spirit required. You put your attacker in its place. You recovered your presumed title. You proved your competence. And most importantly, you re-validated your investment in the project that lies so closely to your heart and your identity. And you did it all by typing out a paragraph in a text box.

Name: Anonymous 2015-04-30 2:22

>>158
Whom are you quoting?

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