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-15 16:16

>>39
How is it a POSIXism? It's standardized in C11 and was already in C99 if I remember correctly.

Name: Anonymous 2015-04-15 16:34

>>39
Why would anyone care about non-Unix platforms besides maybe Windows, which is never going to be truly portable without massive rewrites or compatibility layers anuway?

Name: Anonymous 2015-04-15 16:39

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

I don't know which commit you're referring to, but conversion from a signed integer of the same size to uintptr_t is well-defined by The Standard, see 6.3.1.3.

Name: Anonymous 2015-04-15 16:44

why would a pointer ever be "signed"?

a pointer difference I can understand but not this..

Name: Anonymous 2015-04-15 17:27

>>44
It's not the pointer that is signed, read DA STANDARD.

Name: Anonymous 2015-04-15 18:14

>>41
Unix programmers have been stashing pointers in longs and the like since (approximately) the beginning of time. POSIX provides cover for many historic practices like this one (use of void * to store function pointers is another example). C99 is too recent.

>>43
It may well be defined but the conversion is still destructive.

I will confess I forgot about intptr_t entirely. I believe this particular code could get away with using an intptr_t or if the the range of values to be stored will fit in an intptr_t.

Name: Anonymous 2015-04-15 18:44

>>19
I am guessing it is just laziness. According to >>17 sbase is relying on required implementation behavior of closing streams after exit, which is of course too late if you want to set the exit status should closing fail. This is painful if you have a lot of streams open but in the case of things like echo it is not so hard.

Name: Anonymous 2015-04-15 19:07

>>46
Too recent for what?

Name: Anonymous 2015-04-18 8:29

>>48
;) ur mom

Name: FRIGN 2015-04-18 18:23

>>47
No, it's not laziness. We found out it's not mandated by POSIX that the fclose-function should return an error in case the flush fails (yes, you read that right).
Glibc just behaves this way, and we only noticed that after testing with musl and discussing this with the musl-developers.

fshut() is the combination of literally a day's work of reading standards and applying best practices. A simple fclose() is not sufficient here.

Name: Anonymous 2015-04-18 21:36

>>50
I think the musl developers are being legalistic here. The description of fclose in C89 says it shall deliver buffered data to the host environment (just like fflush does) and return EOF if any errors occur. Not returning EOF for a write error just because it's not specifically called out like the fflush description does is bullshit, or at least very surprising.

Can you name any libc other than musl that behaves this way?

Name: Anonymous 2015-04-18 21:50

In fact, POSIX has exactly the same text in fflush and fclose in the RETURN VALUE section (except the "it shall set the error indicator for the stream" part simply because the stream will be closed).
It also says "The fclose() function shall cause the stream pointed to by stream to be flushed and the associated file to be closed". It does not say anything about not returning EOF if an error has happened in the flushing part.
And in fact, some of the ERRORS in the POSIX page are about flushing failing.

Name: Anonymous 2015-04-19 6:06

>>52
Yeah, looking at the POSIX.1-2013 version of the spec, if you look at the History section for fclose, you see that the errno values for the errors that could occur during fflush were added a couple of years before POSIX.1-2008 was ratified.

musl advertises itself as supporting POSIX.1-2008, but maybe the musl developers erroneously were looking at the older IEEE 1003.1-2001 spec when implementing some of those functions.

Name: Anonymous 2015-04-19 12:07

Name: Anonymous 2015-04-19 12:08

Name: Anonymous 2015-04-19 14:17

>>54
>>55
why are you linking this garbage?

Name: Anonymous 2015-04-19 16:45

>>55
recurse() is getting smarter every day. I expect it to pass the Turing
test in a few months.

Better hope Mentifex doesn't catch wind of this.

Name: Anonymous 2015-04-19 20:10

I hope Mentifex doesn't catch wind of this!

*farts*

Name: Anonymous 2015-04-19 21:02

>>58
I should hope he doesn't, you rude degenerate.

Name: Anonymous 2015-04-20 11:49

>>56
Optimize your quotes, 「下さい」

Name: Anonymous 2015-04-20 16:55

New commits. Check them out.

Name: Anonymous 2015-04-20 17:49

>>61
no

:grumpycat:

Name: Anonymous 2015-04-20 17:53

>>61
They commit too fast so it's not easy to track.

Name: Anonymous 2015-04-21 11:05

Tools still not implemented:
at
awk
bc
diff
ed
getconf
install
od
patch
pathchk
stty

Anyone interested in giving a try on one of these?
Send a patch.

Name: Anonymous 2015-04-21 13:36

It's now possible to tar multiple files in a single run
http://git.2f30.org/sbase/commit/?id=76aa9c05736b0e4e2f06fa45945e5cf702347c48

Name: Anonymous 2015-04-21 15:42

are you suckless developers?

why are you posting this here?

Name: Anonymous 2015-04-21 15:51

In the README0 it says tar is audited. Why so many changes and fixes, then? Audited should mean it's pretty close to perfect. Remove the audit flag and audit everything again, I propose. And keep doing that: multiple audits. What do you think?

0 http://git.2f30.org/sbase/tree/README

Name: Anonymous 2015-04-21 16:48

Why is there no dc? It's my favourite program. And it's the oldest language shipped in UNIX (older than C).

Name: Anonymous 2015-04-21 17:06

send a patch fgt

Name: Anonymous 2015-04-21 20:19

>>69
Sent :^)

Name: Anonymous 2015-04-21 22:49

why is this being spammed here

Name: Anonymous 2015-04-22 1:21

>>71
Because Cudder is all talk and no action, so his anoncoreutils failed hard.
sbase is actually good.

Name: Anonymous 2015-04-22 2:15

>>72
just stop

Name: Anonymous 2015-04-22 2:22

I sent a patch for st. I'm using st every day now, it's sugoi!

>>73
Your idle jealousy is showing, Cudder. Your anoncoreutils were in vain, because you didn't have what it takes to see things through to completion. If only you were a man, instead of being a girl who has long lost her innocence.

Name: Anonymous 2015-04-22 2:37

>>74
Can you send a patch to make st work with the keypress ``Delete''? Onegai, it makes me nervous.

Name: Anonymous 2015-04-22 10:04

>>75
There is already an optional patch for that!

http://st.suckless.org/patches/delkey

They also explain why del doesn't work by default in the FAQ:

http://git.suckless.org/st/tree/FAQ

Name: Anonymous 2015-04-22 10:19

>>75,76
Also, if you press Ctrl-H, it generates DEL.

Name: Anonymous 2015-04-22 11:44

Only on suckless, a ``simple terminal'' consists of a single file that measures over 4000 lines.

Name: Anonymous 2015-04-22 12:37

>>78
The next simplest X11 terminal emulator is uxrvt, and it's over 32,000 lines.

Name: Anonymous 2015-04-22 12:41

>>79
I somehow doubt that urxvt is a single file.

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