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

Pages: 1-4041-8081-

Tox

Name: Anonymous 2014-06-23 12:55

Tox, the distributed instant messaging program, just got a new GUI client that is written in PURE C WITHOUT ANY DIRTY TOOLKITS. Calls Xlib and the win32 api directly.

Pretty interesting.

https://github.com/notsecure/uTox

Name: Anonymous 2014-06-23 12:58

>>1

It is surprisingly small!

Name: Anonymous 2014-06-23 13:22

>>2
Straight to the point

NO BULLSHITE

Name: Anonymous 2014-06-23 13:39

xlib is shit

Name: Anonymous 2014-06-23 13:44

>>4
XCB couldn't be used, mainly because there isn't a way to draw unicode with it. xcb_image_text_16() is the closest thing there is, but isn't a proper approach.
So, the choice was between Xlib or XCB+Cairo+Pango.

Name: Anonymous 2014-06-23 13:48

>>5
goddamn, X is shit

i wouldn't be surprised if wayland turns out to be as bad as X

Name: Anonymous 2014-06-23 13:55

>>6
Well, we have to support X for *Linux, *BSD, etc.
And when Wayland becomes more popular, support for it can be added pretty quickly.
The code is entirely portable, with folders for different windowing systems support (win32 and xlib folders). Adding wayland support should take no more than a week, if it's ever needed.

Name: Anonymous 2014-06-23 13:58

tox my anus

Name: Anonymous 2014-06-23 14:03

>>7
i was complaining about X, i didn't ask anything about your project

Name: Anonymous 2014-06-23 14:15

It's good to see new software being written in a real language. All these young punks are running around with their theories on their moral high horses, thinking about abstractions of other abstractions, and every five minutes they need to come up with a new language to brush all those layers under the rug. Shaking my head all the time at this nonsense. Any software not written in C is effectively dead on the table.

Name: Anonymous 2014-06-23 14:23

/g/ross

Name: Anonymous 2014-06-23 14:38

>>11
Why?

Name: Anonymous 2014-06-23 14:57

>>1
https://github.com/notsecure/uTox/blob/master/list.c, line 145:
messages_friend.iover = ~0;
Invokes UB! I'm out.

Name: Anonymous 2014-06-23 15:15

>>13
I have not read the code but how does it invoke UB? ~ is just the binary not operator

>>1
https://github.com/notsecure/uTox/search?q=uint8_t
(u)intN_t is defined optional! by the C standard and you are using it in places that it is not needed

FILE_T
What the hell?

Name: Anonymous 2014-06-23 15:27

why doesn't C have something like <stdgui.h>? any serious language nowadays comes with some gui ability.

Name: Anonymous 2014-06-23 15:30

>>15
How the hell are you going to make that portable?

Name: Anonymous 2014-06-23 15:31

>>15
Back to the Oracle forums, please.

Name: Anonymous 2014-06-23 15:36

>>16
easy, select one or more:
1) by defining nothing in it
2) by adding __STDC_NO_GUI__ just like they did with threads in C11
3) by implementing the functions but making them fail (ex: window_t *window_create (void) { return NULL; })

Name: Anonymous 2014-06-23 15:39

>>15
Actually the only popular language that has a de jure standard UI toolkit is Java. Funnily enough, next to no one uses Java for GUIs (and of the few that do, many don't use the standard toolkit). The most popular language for writing GUIs is still C++, which has no standard toolkit. From this we conclude that any benefit of providing such a thing is ephemeral.

Name: Anonymous 2014-06-23 15:41

>>19
The most popular language for writing GUIs is still C++, which has no standard toolkit
soon
http://www.phoronix.com/scan.php?page=news_item&px=MTU1OTE

Actually the only popular language that has a de jure standard UI toolkit is Java
How about javashit with DOM/Html?

and of the few that do, many don't use the standard toolkit
I am not a java user but why is this happening?

Name: Anonymous 2014-06-23 15:45

>>20
How about javashit with DOM/Html?
A good example of integrated ``UI toolkits'' being absolute horse shit.

Name: Anonymous 2014-06-23 15:47

>>21
Don't use the ``Don't bump'' functionality when you have something smart to say, shithead

Name: Anonymous 2014-06-23 15:47

>>20
The most popular language for writing GUIs is still C++, which has no standard toolkit
soon

Let us take this opportunity to point and laugh at the standards committee. No one will use this because Qt already exists (as no one uses threads.h because pthreads already exists).

Actually the only popular language that has a de jure standard UI toolkit is Java
How about javashit with DOM/Html?

Didn't consider it, actually. ECMAScript could have been regarded as separate from HTML but these days I doubt that's true in practice.

and of the few that do, many don't use the standard toolkit
I am not a java user but why is this happening?

Because Swing is a hefty pile of shit and its widgets are non-native. Thus anyone who doesn't want to spend a ton of effort to make their application not look like some abortion from the mid 90s uses something else.

Name: Anonymous 2014-06-23 15:49

>>22
How is that post ``something smart to say''? Everyone knows HTML is shit, it adds nothing to the conversation and I'm just expressing a popular opinion.

Name: Anonymous 2014-06-23 15:49

wow wow wow
Enough with all these shit languages
Let's talk C

Name: Anonymous 2014-06-23 15:50

i want everyone at ECMA to die in a violent storm of dicks

Name: Anonymous 2014-06-23 15:51

>>25
Okay, let's tal**Segmentation fault**

Name: Anonymous 2014-06-23 15:52

>>26
Does ECMA has made any useful standard anyway?
C# and the word's 2007 documents do not count

Name: Anonymous 2014-06-23 15:54

>>14
intN_t is the future, you need to accept that. Why care about the standard if the standard is shit?

Name: Anonymous 2014-06-23 15:55

>>29
Why not use (u)int_fastN_t? or even (u)int_leastN_t

Name: Anonymous 2014-06-23 16:02

>>30
Those names look horrible. If your compiler does not support "optional" sized types, you can always typedef them to int_leastN_t and get the same behaviour in most cases.

Name: Anonymous 2014-06-23 16:05

>>31
Those names look horrible
#define INT(n) int_least##n##_t
#define UINT(n) uint_least##n##_t


you can always typedef them
but that will cause UB

Name: Anonymous 2014-06-23 16:07

>>31
Those names look horrible
shitty argument

Name: Anonymous 2014-06-23 16:10

>>31
You are trading off portability for pretty names? That doesn't sound wise. Use the defines >>32 proposed if you really need something pretty.

Name: Anonymous 2014-06-23 16:16

>>32
Make a pull request implementing that and I'm sure he will accept it

Name: Anonymous 2014-06-23 16:17

>>14
~0 is enough to invoke undefined behavior.
C99 supports both ones' complement and sign magnitude as well as two's complement. In a ones' complement machine, all-bits-set is a potential trap representation, as it represents the value you get when you evaluate negative zero.

You're supposed to have the equality -0 == 0. But ~0 == -0. So ~0 invokes undefined behavior. A fix would be ~0u.

Name: Anonymous 2014-06-23 16:23

>>28
Judging from http://en.wikipedia.org/wiki/List_of_Ecma_standards the answer to your question is "No." The only standards bodies that are worthy of any respect these days are IETF, IEEE, and ISO (though maybe not in that order).

>>29-31
Lots of code may rely on the limits of the exact width types for various things, so it's not a good idea in general to interchange leastN_t for N_t.

Nothing stops you from having your own int.h with stuff like

#include <stdint.h>

typedef int_least8_t least8;

#if INT8_MAX
typedef int8_t i8;
#endif

#ifdef INT_FAST8_MAX
typedef int_fast8_t fast8;
#endif


...

Name: Anonymous 2014-06-23 16:24

>>36
Shilly me, I was thinking something else
thanks for clearing this to me
offtopic: signed << something gives implemetation defined value too

Name: Anonymous 2014-06-23 16:27

>>23
Because Swing is a hefty pile of shit and its widgets are non-native. Thus anyone who doesn't want to spend a ton of effort to make their application not look like some abortion from the mid 90s uses something else.

This is a bullshit complaint that only comes from Apple users. Don't be a fucking baby. Just reskin your widgets to have the right colors and you're done.

Name: Anonymous 2014-06-23 16:30

>>39
It is my opinion that Swing widgets, skinned or otherwise, look like shit on all platforms. Skinning just makes it less obvious. And why would you bother with skinning when you could just use something like Qt that looks OK on all platforms with no added effort?

Name: Anonymous 2014-06-23 16:31

>>37
Don't forget IEC

#ifdef INT_FAST8_MAX
(u)int_fast(8, 16, 32, 64)_t are not optional

Name: Anonymous 2014-06-23 16:37

>>41
Good point; for decent targets you could definitely get away with

#include <stdint.h>

typedef int_least8_t least8;
typedef int_fast8_t fast8;

#if INT8_MAX
typedef int8_t i8;
#endif


Really though I'd probably wrap everything in a test macro to handle weird systems that don't care about full ISO compliance (never minding POSIX).

Name: Anonymous 2014-06-23 16:45

#include <stdio.h>
#define VERY_ACCELERATED_SPRINTING_PRINT vasprintf

inline INT_FAST8_MAX FAST_division(const INT_FAST8_MAX a) {
register INT_FAST8_MAX b = a;
return b << 2;
}

int main() {
VERY_ACCELERATED_SPRINTING_PRINT('%d', FAST_division(2));
register INT_FAST8_MAX f = 0;
return f;
}


gcc -Ofast --funroll-loops --fffffast-math blazing.c

HOLY COW I'M TOTALLY GOING SO FAST OH F***

Name: Anonymous 2014-06-23 16:50

>>43
OMG OPTIMIZED

Name: Anonymous 2014-06-23 16:55

>>43
You dickshit, this
i) makes use of non standard functions (vasprintf) that is SLOWER than snprintf and even more slower than sprintf and you don't even make use of its output
ii) INT_FAST8_MAX is not a type and you need to #include <stdint.h> first

Name: Anonymous 2014-06-23 17:00

>>45
You dickshit, this
i) post wasn't even serious

Name: Anonymous 2014-06-23 17:00

>>46
I know but this does not mean you have to post incorrect code

Name: Anonymous 2014-06-23 17:14

>>13
>>36

But notsecure only uses ~0 only when assigning values to unsigned stuff. So there's no portability issue.

Concerning the int.h or a test macro to handle weird systems, I think he has other priorities, such as getting video working. Would you mind doing a pull request or posting the necessary changes in this thread? That would be pretty helpful.

Name: Anonymous 2014-06-23 17:19

so many autists antibumping

Name: Anonymous 2014-06-23 17:22

typedef uint8_t char_t;
WTHHH
this is lame as hell, it uses uint8_t in a place where it is not needed (breaking comportability) and it violotates the POSIX standard (you can not define things that end with _t)

>>48
But notsecure only uses ~0 only when assigning values to unsigned stuff. So there's no portability issue.
0 itself is a signed int, it does not matter if it assigns it to a unsigned

posting the necessary changes in this thread
s/int8_t/int_fast8_t

and since you talking about int_leastN_t being ugly then why is he using _Bool instead of bool?

Name: Anonymous 2014-06-23 17:24

>>48
Optimise your quotes, cretin.

Name: Anonymous 2014-06-23 17:29

>>50
s/int8_t/int_fast8_t

Isn't that a less readable approach?

What about an int.h or a test macro to handle weird systems?

Name: Anonymous 2014-06-23 17:32

>>52
Anyone can create a int.h (with test macros) in a few minutes, let him do it himself

Name: Anonymous 2014-06-23 17:32

I don't really think the developer has time for this stuff right now, he is working of getting video, now that audio was added last week.
Pull requests would surely make him happy, I believe.
If you aren't in the mood, just keep complaining and I hope he eventually deal with all by himself.

Name: Anonymous 2014-06-23 17:35

I don't really think the developer has time for this stuff right now, he is working of getting video, now that audio was added last week.
Are you kidding me? This is a 5 minutes job

If you aren't in the mood, just keep complaining and I hope he eventually deal with all by himself.
I am not complaining nor I care about utox. it is better than most other software anyway

Name: Anonymous 2014-06-23 17:39

Are you kidding me? This is a 5 minutes job
Oh, I thought it was more work.

I am not complaining nor I care about utox. it is better than most other software anyway
Got it.

Name: Anonymous 2014-06-23 17:40

>>56
I may make a patch if I ever stop being lazy

Name: Anonymous 2014-06-23 17:43

>>57
I will be eagerly waiting.
For some reason, it makes me happy seeing developers working together. It gets me almost moist.
Something that I would love is it to compile without warnings, but there are so many of them, that I doubt it will ever be done.

Name: Anonymous 2014-06-23 17:44

Clang's -Weverything or go home!

Name: Anonymous 2014-06-23 17:49

>>58-59
faggots
alias c="gcc-4.9 -fdiagnostics-color=always -g -gdwarf-4 -Og -Wall -Wextra --std=c11 -Wpedantic -Wno-empty-body -Wno-unused-parameter -fno-diagnostics-show-caret -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer -Wno-unused-function -fcilkplus -pthread -lpthread -D_XOPEN_SOURCE=700"

Name: Anonymous 2014-06-23 18:15

>>59
clang is ghetto apple halfmast piece of beef
i will piss on you motherfucker

Name: Anonymous 2014-06-23 18:41

>>61
Use GHC!

Name: Anonymous 2014-06-23 19:04

C a shit.

Name: Anonymous 2014-06-23 19:08

>>63
You mean you see a shit? What does it look like?

Name: Anonymous 2014-06-23 19:25

C
Why not use ATS?

Name: Anonymous 2014-06-23 20:28

HOLY SHIT, /g/ still on with this shit!
We've solved that AGES AGO:
https://en.wikipedia.org/wiki/Off_the_record_messaging#Client_support
https://en.wikipedia.org/wiki/SILC_%28protocol%29

Their time could be better used in projects like
https://en.wikipedia.org/wiki/Cjdns
https://en.wikipedia.org/wiki/Gnunet

I guess autistic /g/ will always stay autistic. By definition, they are hipsters

Name: Anonymous 2014-06-23 20:42

>>66
But those aren't user-friendly, so nobody uses it.
Also, it depends on a server, that isn't too secure. uTox is distributed.

Name: Anonymous 2014-06-23 20:43

>>66

It will never end.

The main core developer has committed code for the last 366 days, straight. https://github.com/irungentoo

Name: Anonymous 2014-06-23 20:54

>>64
But those aren't user-friendly, so nobody uses it.
https://www.youtube.com/results?search_query=Jitsi

Also, it depends on a server,
These clients support Off-the-Record Messaging out of the box.

Niggar, if you are gonna lie, do better.

>>68
yeah I saw. It too depressing to watch.

Name: Anonymous 2014-06-23 20:56

>>65
because they're too dumb to grasp dependent types

Name: Anonymous 2014-06-23 20:59

Trivia: even most uTox's icons are written in C. svg is bloat. Eventually, it will all be C. Even notification sounds will be in C, probably some sine waves or something (can't remember the developer exact words).

How cool is that?

Name: Anonymous 2014-06-23 21:02

>>71
Stop astroturfing, it's obvious you're the OP of this thread. You're risking a ban. We've had a few threads about Tox already, most of us just aren't interested in /g/ projects.

Name: Anonymous 2014-06-23 21:05

>>72
Sorry, I didn't know we had threads about it earlier, never saw one.
Anyway, I am mostly talking about uTox, a Tox client. Not Tox itself.
Sorry, Mr. Anonymous.

Name: Anonymous 2014-06-23 21:10

>>72
The idea started on /g/, but it isn't really a /g/ project. But whatever

Name: Anonymous 2014-06-23 21:12

The tox developers are horrible people. They are ignorant and feel they are `competing' with the other open source telephony/chat alternatives. They are also making their users vulnerable by encouraging them to use a p2p software in pre alpha stage. The only software I will write for tox will be maleware. now please go away before I turn your wall paper in goatse.

Name: Anonymous 2014-06-23 21:14

>>72
Wait, are there mods now, or is that Admin-sama?

>>75
300% agreed.

Name: Anonymous 2014-06-23 21:16

>>76
It's me. I'm still the only one.
>>73,74
Why did you split that into two posts?

Name: Anonymous 2014-06-23 21:20

>>76

Yes there are mods now. I'm looking at your i.p. right now kiddo, watch your mouth or i'll send a virus to your mom's computer.

Name: Anonymous 2014-06-23 21:23

>>77
Ah ok.

Name: Anonymous 2014-06-23 21:26

>>78
no please don't I spent a fortune to buy windows 8.1 for her!

Name: Anonymous 2014-06-23 21:29

>>77
Why did you split that into two posts?
I decided to address his other sentence at a later time only. Not that it matters, does it? I am not bumping

Name: Anonymous 2014-06-23 21:44

utox is the future.

all hail utox.

Name: Anonymous 2014-06-24 0:44

>>83
wat

Name: Anonymous 2014-06-24 0:49

>>83
Don't bother posting meaningless garbage, nobody thinks you're funny.

Name: Anonymous 2014-06-24 0:55

>>86
Oh but I do!

Name: Anonymous 2014-06-24 1:13

>>83
But there is a cli version!
https://github.com/Tox/toxic

Name: Anonymous 2014-06-24 5:03

>>5
Xlib cannot do complex layout for rtl and others scripts. You will need pango or similar.

Name: Anonymous 2014-06-24 9:20

>>89
Or you could just use English.

Name: Anonymous 2014-06-24 13:23

>>90
לא תודה‮!

Name: Anonymous 2014-06-24 13:24

>>89,91
Shalom!

Name: Anonymous 2014-06-24 13:32

What happened to >>83?
What was in >>83?

Name: Anonymous 2014-06-24 13:33

>>93
Stop repeating that every time a post gets deleted you braindead nigger

Name: Anonymous 2014-06-24 13:35

>>94
Whom did you just called an ``nigger''?

Name: Anonymous 2014-06-24 16:42

Name: Anonymous 2014-06-25 22:43

>>96
I don't even mind, since you optimised your quotes.

Name: Anonymous 2014-06-28 10:59

Name: Anonymous 2014-06-28 12:25

>>98
It is nice but it does not support the unsigned case, something very easy to do
also optimise your quotes

Name: Anonymous 2014-06-28 15:15

Name: Anonymous 2014-06-28 15:23

>>100
cool, isn't it?

Name: Anonymous 2014-06-28 15:53

>>15

C does have stdgui.h. Just that it is called SDL 1.2

Name: Anonymous 2014-06-28 16:48

>>102
But sdl has only one and shitty implemetation, it is shitty designed and it is unportable and not standard

Name: Anonymous 2014-06-28 16:51

>>103

You're wrong. Practically every OS has it's own SDL implementation.

Name: Anonymous 2014-06-28 17:04

>>100

That's only temporary, will be eventually replaced by scalable vector graphics in C.
Just like the icons here: https://github.com/notsecure/uTox/blob/master/svg.c

Name: Anonymous 2014-06-28 18:08

>>104
The API itself is made so it can not be fully portable, the implemetation is even worse in that part

Name: Anonymous 2014-06-29 12:19

>>103,106
What does that even mean? Elaborate.

Name: Anonymous 2014-07-03 12:22

>>107
One of those is mine and I don't see how it relates to the others

Name: Anonymous 2014-07-03 12:46

>>108
That doesn't matter, answer the damn question.

Name: Anonymous 2014-07-03 17:00

>>109
No, thanks.

Name: Anonymous 2016-07-11 5:34

(stopping the dubsfaggot from dubsbumping)

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