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

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?

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