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-02 22:10

suckdickss

Name: Anonymous 2015-04-02 22:16

This is what Cudder tried to do with his anonutils back in... 2008? But as we know, Cudder is all talk and no action, so the end result was around a dozen half-assed, incomplete, bug-ridden utils.
Learn from this, Cudder, you little prick.

Name: Anonymous 2015-04-02 22:30

Name: Anonymous 2015-04-02 22:43

>>4
How is it incorrect? It's 100% POSIX 2013 compliant.

Name: Anonymous 2015-04-02 23:31

it doesnt print shit that loons like cmdline arg

Name: Anonymous 2015-04-03 0:00

>>5
No, it is not. Let's see

The echo utility shall not recognize the "--" argument in the manner specified by Guideline 10 of XBD Utility Syntax Guidelines; "--" shall be recognized as a string operand.

Implementations shall not support any options.

Name: Anonymous 2015-04-03 8:36

Suckless? LOL, more like dickless, even the echo is wrong. And that's the easiest of them.

Name: Anonymous 2015-04-03 11:36

Name: Anonymous 2015-04-03 11:49

Name: Anonymous 2015-04-03 12:28

>>6

I presume "loons" is a typo of "looks". If I understand you
correctly, you are wrong:

; ./echo -h -a hello
-h -a hello

Are you suggesting you thought it would not print '-h -a'?

Name: Anonymous 2015-04-03 13:40

For comparison, Cudder's echo(1) from anoncoreutils[1]

/* @echo.c */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char **argv) {
int i=1, no_nl=0, ret=0;
if(argc>1 && !strcmp(argv[1],"-n")) {
no_nl=1;
i++;
}
while(i<argc) {
ret|=(fputs(argv[i++], stdout)==EOF);
if(i!=argc)
ret|=(fputc(' ',stdout)==EOF);
}
if(!no_nl)
ret|=(fputc('\n',stdout)==EOF);
return ret;
}


[1] http://rechan.eu.org/misc/anoncoreutils-20080617-2.tar.bz2

Name: Anonymous 2015-04-03 13:41

And here's sbase echo(1) [1]

/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <string.h>
#include "util.h"

int
main(int argc, char *argv[])
{
int nflag = 0;

if (*++argv && !strcmp(*argv, "-n")) {
nflag = 1;
argc--, argv++;
}

for (; *argv; argc--, argv++)
putword(*argv);
if (!nflag)
putchar('\n');

return 0;
}


http://git.2f30.org/sbase/tree/echo.c

Name: Anonymous 2015-04-03 13:59

I SUMMON LAC!!!

Name: Anonymous 2015-04-03 16:16

I think the command ``command'' is very useful, especially the -v option.

When the -v or -V option is used, the command utility shall provide information concerning how a command name is interpreted by the shell.

So you can do ``command -v program'' and get the location of ``program''. It's pretty neat.

Can sbase get this command, please?

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html

Name: Anonymous 2015-04-03 20:59

It lacks error handling, below is bash's echo
$ echo test > /dev/full
bash: echo: write error: No space left on device
$ echo $?
1


Bellow is suckmore's echo
$ echo test > /dev/full
$ echo $?
0


Based on POSIX if an error has occurred echo should return a value bigger than 0. It also may use stderr for diagnostic messages.

Name: Anonymous 2015-04-03 21:28

>>16

This is a "known issue".
Basically, on return, the system flushes all buffers. in case flushing errors-out (the libc fails to write its internal buffers to the kernel device) it can't report an error and ignores it.
GNU coreutils solve this by having an onexit-function doing the cleanup and reporting errors in case something fails.
However, _exit is usually used across sbase which doesn't call onexit-functions and generally speaking, onexit-functions are a pain in the ass to take care of.
Another idea was to have a efclose-function which closes stdin and stdout at the end and reports an error in case it fails. However, it's not simple to take care of that across sbase either. In the end, the conclusion was that this is a more or less non-priority issue.
This has been kept it mind, same with echo, but not reflected on it as there were more important issues.

If you have any ideas, let it be known.

Name: Anonymous 2015-04-03 21:36

I copy-pasted >>17 from IRC.
The developers said they won't use this BBS because they aren't hipsters and that people should send patches. They don't give a damn about anything but patches, even though >>7-san made them review echo(1).
Who the hell criticizes people testing their software and reporting bugs? LOL
I've never seen this before.

Name: Anonymous 2015-04-03 22:23

>>17
What's wrong with this? return fclose (stdout) == EOF;
It seems to work nicely for the case of >/dev/full, fflush works fine too.
Or they could just use write(2) like their friends at plan9, write does not use buffers. (or just disable buffering on stdout)

Name: Anonymous 2015-04-04 5:03

>>18 Why would they give a damn about this BBS... They don't get it, they're filthy casuals.
>>3 I remember... fuckn spammin his AnonOS project everywhere

Name: Anonymous 2015-04-04 19:05

>>18
4chan/g/ ``trolling'' mozilla. Social Justice Warriors spamming mailing lists. There's a reason for it.

Name: Anonymous 2015-04-04 19:49

Name: Anonymous 2015-04-04 20:20

>>22
Amazing how fast things can change when your code is not an XBOX HUEG pig disgusting mess.

Name: Anonymous 2015-04-04 20:28

suckless
The developers said they won't use this BBS because they aren't hipsters
in theatres september 1993
Potmeetskettle
"Hilarious!" - Paul Arden, Minneapolis Gazette

Name: Anonymous 2015-04-04 22:50

Name: Anonymous 2015-04-04 22:50

Name: Anonymous 2015-04-04 22:51

Name: Anonymous 2015-04-04 22:57

>>25-27
Go back to /g/, please!

Name: Anonymous 2015-04-04 23:33

Name: Anonymous 2015-04-05 2:13

Name: Anonymous 2015-04-05 7:23

Great Satori~n, this isn't just coreutils, it's a complete system, using musl libc, static linking, binary packages & source ports, etc. etc.

http://morpheus.2f30.org/

It's too bad the last update was 2014, they need more people to keep the packages current.

Name: Anonymous 2015-04-05 11:13

>>31
Alpine Linux is a complete system using musl libc.
Why not work on it instead of coming up with another distribution?
Just convince Alpine developers to migrate to sbase, sinit, etc. and be done with it.
Can you imagine Morpheus getting libreoffice, firefox and all other big programs? I can't.

Name: Anonymous 2015-04-05 11:44

>>30
Wow, nice. Except it should've been implemented in Haskell, not Racket.

Name: Anonymous 2015-04-05 23:02

>>33
Wow, nice. Except these dubs should have been gotten by a more worthy poster.

Name: Anonymous 2015-04-05 23:07

>>30
Who are you quoting?

Name: Anonymous 2015-04-06 5:20

>>35
*whom

Name: Anonymous 2015-04-14 15:42

Name: Anonymous 2015-04-14 15:58

/* because putting integers in pointers is undefined by the standard */
What? uintptr_t is very well defined.

Name: Anonymous 2015-04-14 19:29

>>38
uintptr_t is unsigned. It looks like the author wants a signed integer here and that is a significant difference.

Technically uintptr_t is also a POSIXism so if you actually care about non-Unix like systems it's best not to rely on it. Since this is a suckless project I assume that is not the case here, though.

Name: Anonymous 2015-04-14 19:59

SuckLess Unix Tools

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