Live data from Hacker News

Ada implementation of an X Window System Server (1989)

sci-hub.se

11–20 of 41 posts

Re: Ada implementation of an X Window System Server (1989)

#11

Earlier quoted context omitted.

>the Ada implementation had nearly double the lines of code as the C reference I'll point out to others in the audience: this is largely an artifact of Ada syntax being more verbose, and Ada programming practice favouring longer and more explanatory identifiers compared to C (where a lot of code looks like line noise). For example, see this post and compare the size of the C code vs. the equivalent Ada code: https://…

A lot of the Ada limitations pointed out in the paper were fixed in Ada95.

> A lot of the Ada limitations pointed out in the paper were fixed in Ada95.

I was going to say that as well. I only more recently hopped on the train, but I didn't see anything which would be problematic for Ada 2012. I've had no problems in my projects doing bit manipulation, using function pointers, dynamic dispatch, or interfacing with C code which uses `void*`.

> this is largely an artifact of Ada syntax being more verbose

There's a very negative connotation of "verbose" like it's the worst thing in the world. The better way of describing this is the language is explicit and focuses on describing intent. This means it doesn't take long to learn to read and understand standard library code or code from other projects.

Re: Ada implementation of an X Window System Server (1989)

#12
post #10
post #3

This server appears to have been closed source, and I assume the source is lost. My bet is that OpenBSD's X server has a far better security design, as the server itself no longer runs as root. The aggressive free() also exposed use-after-free bugs never before seen, and OpenBSD has superior mitigations for rop gadget abuse, aslr everywhere, and other exploits beyond the imagination of 1989. The paper documents probl…

> The aggressive free() also exposed use-after-free bugs never before seen What do you mean by that? Is there an overview somewhere about "aggressive free()" that I can read?

I'll look it up for you a little later.

OpenBSD altered malloc/free to use mmap instead of sbrk.

This allowed free to remove larger allocations from the address space, which caught a lot of programs that were using memory after free.

Re: Ada implementation of an X Window System Server (1989)

#13

Earlier quoted context omitted.

A lot of the Ada limitations pointed out in the paper were fixed in Ada95.

> A lot of the Ada limitations pointed out in the paper were fixed in Ada95. I was going to say that as well. I only more recently hopped on the train, but I didn't see anything which would be problematic for Ada 2012. I've had no problems in my projects doing bit manipulation, using function pointers, dynamic dispatch, or interfacing with C code which uses `void*`. > this is largely an artifact of Ada syntax being m…

>There's a very negative connotation of "verbose" like it's the worst thing in the world. The better way of describing this is the language is explicit and focuses on describing intent. This means it doesn't take long to learn to read and understand standard library code or code from other projects.

I agree that it's good. But it's objectively longer, which is what I meant.

Re: Ada implementation of an X Window System Server (1989)

#14
It's interesting how the X11 server is the only major category of infrastructure where we have one and only one open source implementation.

With browsers -- which are massively complex nowadays -- at least we have both WebKit and Gecko.

C++ compilers are at a similar level of complexity and there is GCC and Clang.

Linux, FreeBSD, OpenBSD etc. are all separate kernels.

But for X11 there is only the the X.Org server, the reference implementation. How much work would it be to implement a practical X11 server in a safe language like Ada or Rust, which supports the widely-used extensions?

Re: Ada implementation of an X Window System Server (1989)

#15

It's interesting how the X11 server is the only major category of infrastructure where we have one and only one open source implementation. With browsers -- which are massively complex nowadays -- at least we have both WebKit and Gecko. C++ compilers are at a similar level of complexity and there is GCC and Clang. Linux, FreeBSD, OpenBSD etc. are all separate kernels. But for X11 there is only the the X.Org server, t…

I assume there's only one implementation because for decades people have been saying that X is an antiquated design, and they want a different way. Thus we got Wayland.

Re: Ada implementation of an X Window System Server (1989)

#16
post #3

This server appears to have been closed source, and I assume the source is lost. My bet is that OpenBSD's X server has a far better security design, as the server itself no longer runs as root. The aggressive free() also exposed use-after-free bugs never before seen, and OpenBSD has superior mitigations for rop gadget abuse, aslr everywhere, and other exploits beyond the imagination of 1989. The paper documents probl…

>the Ada implementation had nearly double the lines of code as the C reference I'll point out to others in the audience: this is largely an artifact of Ada syntax being more verbose, and Ada programming practice favouring longer and more explanatory identifiers compared to C (where a lot of code looks like line noise). For example, see this post and compare the size of the C code vs. the equivalent Ada code: https://…

> this is largely an artifact of Ada syntax being more verbose

If you think Ada is actually verbose check out the Ada++ comparisons with other major languages like C++ and Java.

http://www.adapplang.com/tutorial.html

Re: Ada implementation of an X Window System Server (1989)

#17

Earlier quoted context omitted.

> A lot of the Ada limitations pointed out in the paper were fixed in Ada95. I was going to say that as well. I only more recently hopped on the train, but I didn't see anything which would be problematic for Ada 2012. I've had no problems in my projects doing bit manipulation, using function pointers, dynamic dispatch, or interfacing with C code which uses `void*`. > this is largely an artifact of Ada syntax being m…

>There's a very negative connotation of "verbose" like it's the worst thing in the world. The better way of describing this is the language is explicit and focuses on describing intent. This means it doesn't take long to learn to read and understand standard library code or code from other projects. I agree that it's good. But it's objectively longer, which is what I meant.

Source code is there for people; the question becomes, does it become more understandable?

Re: Ada implementation of an X Window System Server (1989)

#18

Earlier quoted context omitted.

>the Ada implementation had nearly double the lines of code as the C reference I'll point out to others in the audience: this is largely an artifact of Ada syntax being more verbose, and Ada programming practice favouring longer and more explanatory identifiers compared to C (where a lot of code looks like line noise). For example, see this post and compare the size of the C code vs. the equivalent Ada code: https://…

> this is largely an artifact of Ada syntax being more verbose If you think Ada is actually verbose check out the Ada++ comparisons with other major languages like C++ and Java. http://www.adapplang.com/tutorial.html

Stop posting an April Fool’s joke as if it were serious, please.

Re: Ada implementation of an X Window System Server (1989)

#19

It's interesting how the X11 server is the only major category of infrastructure where we have one and only one open source implementation. With browsers -- which are massively complex nowadays -- at least we have both WebKit and Gecko. C++ compilers are at a similar level of complexity and there is GCC and Clang. Linux, FreeBSD, OpenBSD etc. are all separate kernels. But for X11 there is only the the X.Org server, t…

> With browsers -- which are massively complex nowadays -- at least we have both WebKit and Gecko.

Isn't that a bit of a historical accident? Almost all alternative browsers are now based on Chromium, and if Firefox dies or drops Gecko, I doubt anyone would go through the trouble to create a new one. I mean Microsoft tried and gave up on it, and they're one of the few organizations with the resources to actually succeed.

Re: Ada implementation of an X Window System Server (1989)

#20

It's interesting how the X11 server is the only major category of infrastructure where we have one and only one open source implementation. With browsers -- which are massively complex nowadays -- at least we have both WebKit and Gecko. C++ compilers are at a similar level of complexity and there is GCC and Clang. Linux, FreeBSD, OpenBSD etc. are all separate kernels. But for X11 there is only the the X.Org server, t…

The KDrive X11 server was separate to the original one even though it was bundled with the rest of the X.Org software.
Post reply on HN