NeWS (ex 80s SunDew): was/is better than x11? does it deserve resurrection?  - Page 1
Forum section: electronics / general

author: DiTBho
author_rank: Super Contributor
timestamp: July 28, 2022, 07:59:52 am
content: So,NeWSstands for "NetworkextensibleWindowSystem" is a discontinued windowing system developed bySun Microsystemsin the mid-80s.I seriously *hate*Sun Microsystemsfor their crappy SPARC architecture (specifically I don't like the window registers, because it makes debugging hell), but I have to admit NeWS was a good idea.NeWS started by implementing a PostScript interpreter, then added a complete view hierarchy, and a complete model for events, including timers and other automatic events, input queues for devices such as mice and keyboards, and other functionality required for full interaction, so the input handling system was designed to provide strong event synchronization guarantees that were not possible with asynchronous protocols like X.This means, NeWS was potentially better than X11 ... unfortunately slower due to bad implementation, and badly managed at the business level.What is bad is that NeWS is based on PostScript, it talks PostScript, it's mostly programmed in PostScript, and for sure, you don't want to debug Postscript because it's too difficult hence to prone to carry bugs. But ... looking at the whole concept, how events are managed and handled, damn, it's not that bad and it could be rewritten in pure C nowadays, in a modern, compact, clean way.

author: PKTKS
author_rank: Super Contributor
timestamp: July 28, 2022, 08:05:30 am
content: Postscript has the utmost steep learning curve of all...You rather just have a Gks interface made for postscript in ghostscript tools...They are a hell to deal withPaul

author: newbrain
author_rank: Super Contributor
timestamp: July 28, 2022, 08:30:22 am
content: NeWS was so resource-heavy on the machines of the time (early '90s for me) that it was impossible for me to use, as I needed some near RT performance.It was a project to generate simulation data and control a high speed data recorder for later faster playback on a dedicated HW signal generator.SunOS with regular X11 was so much better in not hogging memory and CPU while still running a nice GUI that it was possible to a limited extent to generate useful real time data, skipping the recording/playback step, generation jitter was not an issue, as it was taken care by the HW (FIFOs + time stamped data).That said, it was fun to send postscript drawings directly to the screen, especially to that of coworkers.

author: bd139
author_rank: Super Contributor
timestamp: July 28, 2022, 10:43:22 am
content: This concept is used all over the place and no one realises it.Look at Apple Quartz which is the main display compositor in macOS.https://en.m.wikipedia.org/wiki/Quartz_(graphics_layer)Incidentally that’s why doing stuff with PDFs on macs is so much more pleasant.macOS is basically all the best bits of various unixes fudged into one blob that works properly. Oh and it’s actually a certified unix too. Winner winner chicken dinner.

author: DiTBho
author_rank: Super Contributor
timestamp: July 28, 2022, 07:39:02 pm
content: what would you use to replace the Postscript interpreter?

author: bd139
author_rank: Super Contributor
timestamp: July 28, 2022, 07:39:38 pm
content: https://developer.apple.com/documentation/pdfkitOnly for documents. I'd write stuff in some other language and forget it all exists

author: DiTBho
author_rank: Super Contributor
timestamp: July 28, 2022, 07:49:56 pm
content: Quote from: PKTKS on July 28, 2022, 08:05:30 amYup, nobody "sane" would write a PostScript interpreter these days, and most of the old ones have vanished into the mists of history.

author: DiTBho
author_rank: Super Contributor
timestamp: July 28, 2022, 07:56:35 pm
content: QuoteQuoteFrom the Wiki, seeherefor the two approaches!

author: Nominal Animal
author_rank: Super Contributor
timestamp: July 29, 2022, 07:51:10 am
content: It would be an interesting research project to consider a compositor using SVG or a binary representation thereof.That is, the UI would be defined in terms of (a subset of) SVG elements and not pixmaps like they are in X11. Data flowing between an application and the display would be in terms of SVG visuals and not pixmaps (and of course UI event descriptions).The display server would require a fast/efficient SVG rasterizer for the actual framebuffer, of course.In terms of efficiency, the compositor approach really depends on the available display hardware. X11 was designed in an era where displays had bitmap (BW) or pixmap-based framebuffers, and basically no acceleration, so everything had to be done in software. This is also why basically none of the current approaches really take full advantages of the hardware capabilities: the hardware has leaped forward, but the software is still much the same.

author: bd139
author_rank: Super Contributor
timestamp: July 29, 2022, 07:59:23 am
content: SVG parsing snd rendering is terribly slow and CPU intensive so I’m not sure I’d want that.There’s a mid ground somewhere which bridges how the hardware works and how humans thing without too many compromises on either side. We haven’t found it quite yet. Most of what we have errs towards humans with lots of bitmap caching at the moment.

author: DiTBho
author_rank: Super Contributor
timestamp: July 29, 2022, 09:33:48 am
content: Quote from: Nominal Animal on July 29, 2022, 07:51:10 amaren't GPUs extremely good nowadays for a fast/efficient SVG rasterizer?

author: Nominal Animal
author_rank: Super Contributor
timestamp: July 29, 2022, 10:18:02 am
content: Quote from: DiTBho on July 29, 2022, 09:33:48 amNo, not really. SVG is a bit too abstract, a bit too high-level.You do need things like quadratic and cubic curves, though. They would be best rendered with pixel shaders, and not as vertex geometry, though. (Basically all fonts we use now are defined in terms of line segments and quadratic and cubic curves.)It'd take quite a cross-disciplinarian to find out a good descriptive format. That's why I wrote "a subset of SVG elements".For example, if you want to draw a circular dot, you can do so quite fast by setting up a triangle or a rectangle that covers the dot (including any antialiasing region), and then use a pixel shader to draw the actual dot, using either cartesian (∆x²+∆y²≤r²) or texel/barycentric coordinates (the form of which depends on the exact shape of the triangle used). Right now, this sort of techniques are used to draw a very large number of semi-transparent spheres/spheroids for real-time particle effects, for example.In other words, implicit equations for 2D shapes might yield good results.

author: DiTBho
author_rank: Super Contributor
timestamp: July 29, 2022, 11:50:37 am
content: so, the answer to the question in the title of this topic is:noresurrection, let it rest in peace.R.I.P.NeWS