News for hackers. Stuff that matters.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by mwfunk on Tuesday April 23, 2019 @01:53PM (#19731078)
I enjoyed the article but this quote jumped out at me: "What took thirty years to build isn't going to be replaced in a day." This was in regard to replacing X11 with Wayland. It's funny because it would be closer to the truth to say that X11 took 5 years to build, and for the last 25 years everyone has been trying to get off of it, but in the meantime piling more stuff on top of it since that's easier than starting from scratch. 25 years ago there were people saying stuff like, "I wish we had something else, but this is what we're stuck with, and it's just too much work to make a new window system, so let's just add another protocol extension."

So we're already 25 years into trying to replace X11, which is already far longer than the period of time in which it was being designed and actively developed on a foundational level. There's got to be some good lessons learned in all of this about software lifecycles or getting it right the first time or knowing when to move on or OS development by way of mailing list consensus. I totally get why it's still used after all these years, it performs an essential task- but I bet the original creators would be the ones most shocked that it's still a thing in 2019.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by 0xfaded on Tuesday April 23, 2019 @03:13PM (#19731856)
I've been reading through the Vulkan spec, which is in way similar in that OpenGL has been extended since its introduction in 1992 with more and more features to support new graphics capabilities as they evolved.

I've seen Vulkan called the successor to OpenGL, but reading the spec it seems more like the end game for raster graphics card programming. OpenGL 4.0 was released in 2010, and since then changes have been incremental. We more or less have figured out how to do raster graphics (ray tracing may be a different story), so it made sense to invest tens (hundreds?) of millions of dollars to develop the Vulkan spec, and then many millions more to implement it.

What other technologies are there were we are more or less at the end game? I know Qt5 widgets is considered feature complete for desktop apps.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by DonHopkins on Tuesday April 23, 2019 @04:01PM (#19732283)
Photoshop pretty much got it right a couple decades or so ago, and they've just been porting it, smearing on new lipstick, and figuring out how to make more money with it ever since.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by ocdtrekkie on Tuesday April 23, 2019 @04:37PM (#19732579)
I would argue that this is true of most of Microsoft Office as well. When did they really add a new feature to PowerPoint that you had to have?

And it's no surprise both Adobe and Microsoft have pushed people towards a subscription model for this software: Nobody in their right mind would pay for upgrades otherwise. Arguably Office you need every ten years to ensure you have security updates because of the amount of foreign content you process with it, but Adobe? Psh.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by mustacheemperor on Tuesday April 23, 2019 @06:33PM (#19733656)
>When did they really add a new feature to PowerPoint that you had to have

Funny enough, the screen recording functionality added to PowerPoint a few updates ago is as far as I can tell the best simple screen recorder available for Windows 10 and the closest thing to native screen recording outside the game bar. Not sure why that hasn't made it into the snipping tool yet.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by DonHopkins on Tuesday April 23, 2019 @04:52PM (#19732733)
The feature set of Microsoft Office, yes. But I think Google Docs took some reasonable steps backwards in features in exchange for a big leap forward in collaboration. (Or a few steps towards but not nearly far enough to where Douglas Engelbart was in 1968.)

https://en.wikipedia.org/wiki/The_Mother_of_All_Demos

>The live demonstration featured the introduction of a complete computer hardware and software system called the oN-Line System or, more commonly, NLS. The 90-minute presentation essentially demonstrated almost all the fundamental elements of modern personal computing: windows, hypertext, graphics, efficient navigation and command input, video conferencing, the computer mouse, word processing, dynamic file linking, revision control, and a collaborative real-time editor (collaborative work). Engelbart's presentation was the first to publicly demonstrate all of these elements in a single system. The demonstration was highly influential and spawned similar projects at Xerox PARC in the early 1970s. The underlying technologies influenced both the Apple Macintosh and Microsoft Windows graphical user interface operating systems in the 1980s and 1990s.

http://worrydream.com/Engelbart/

>Engelbart's vision, from the beginning, was collaborative. His vision was people working together in a shared intellectual space. His entire system was designed around that intent.

>From that perspective, separate pointers weren't a feature so much as a symptom. It was the only design that could have made any sense. It just fell out. The collaborators both have to point at information on the screen, in the same way that they would both point at information on a chalkboard. Obviously they need their own pointers.

>Likewise, for every aspect of Engelbart's system. The entire system was designed around a clear intent.

>Our screen sharing, on the other hand, is a bolted-on hack that doesn't alter the single-user design of our present computers. Our computers are fundamentally designed with a single-user assumption through-and-through, and simply mirroring a display remotely doesn't magically transform them into collaborative environments.

>If you attempt to make sense of Engelbart's design by drawing correspondences to our present-day systems, you will miss the point, because our present-day systems do not embody Engelbart's intent. Engelbart hated our present-day systems.

And it's in the direction of multi-user collaboration that X-Windows falls woefully short. Just to take the first step, it would have to support separate multi-user cursors and multiple keyboards and other input devices, which is antithetical to its singleminded "input focus" pointer event driven model. Most X toolkits and applications will break or behave erratically when faced with multiple streams of input events from different users.

https://tronche.com/gui/x/xlib/input/XGrabPointer.html

For the multi-player X11/TCL/Tk version of SimCity, I had to fix bugs in TCL/Tk to support multiple users, add another layer of abstraction to support multi-user tracking, and emulate the multi-user features like separate cursors in "software".

Although the feature wasn't widely used at the time, TCL/Tk supported opening connections to multiple X11 servers at once. But since it was using global variables for tracking pop-up menus and widget tracking state, it never expected two menus to be popped up at once or two people dragging a slider or scrolling a window at once, so it would glitch and crash whenever that happened. All the tracking code (and some of the colormap related code) assumed there was only one X11 server connected.

So I had to rewrite all the menu and dialog tracking code to explicitly and carefully handle the case of multiple users interacting at once, and refactor the window creation and event handling code so everything's name was parameterized by the user's screen id (that's how you fake data structures in TCL and make pointers back and forth between windows, by using clever naming schemes for global variables and strings), and implement separate multi-user cursors in "software" by drawing them over the map.

Multi-Player X11 SimCityNet:

https://www.youtube.com/watch?v=_fVl4dGwUrA

X11 SimCity Pie Menus:

https://www.youtube.com/watch?v=Jvi98wVUmQA

Multi-user menu tracking (added "@$screen" parameterizations):

https://github.com/SimHacker/micropolis/blob/master/micropol...

Opening multiple X11 displays (multiple toplevel "head" windows per screen, each with a unique id, using $win parameterization):

https://github.com/SimHacker/micropolis/blob/master/micropol...

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by ghthor on Tuesday April 23, 2019 @06:11PM (#19733478)
This human hacks!
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by NullPrefix on Tuesday April 23, 2019 @04:46PM (#19732659)
Don't know when it was added, but I recently found out that you can have multiple synchronized Word windows of the same document.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by ksaj on Tuesday April 23, 2019 @05:58PM (#19733365)
At least 15 years ago you could drag a marker that hides above the vertical scroll to create multiple views of the same document. I didn't know it carried into other windows, so that might be newer.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by DonHopkins on Tuesday April 23, 2019 @06:29PM (#19733624)
On different people's screens?
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by Someone on Tuesday April 23, 2019 @06:58PM (#19733842)
Yes (in Office 365, in your browser). See https://support.office.com/en-us/article/collaborate-on-word...
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by grumblepeet on Wednesday April 24, 2019 @01:19AM (#19735767)
PowerPoint now has a great feature where it will do speech to text and supply real time subtitles below your presentation. It’s pretty good too. Seems to ignore swear words though (yes we tested that first).
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by dingaling on Wednesday April 24, 2019 @12:43AM (#19735631)
Photoshop has had at least two massive functional changes; layers in 3.0 and non-destructive editing in CS3.

And probably one huge philosophical change, given that it was originally designed for displaying grayscale images.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by MagicPropmaker on Tuesday April 23, 2019 @07:40PM (#19734144)
Have you used Photoshop lately? There are many new, modern features for selection, content aware erasing, scaling, filling, HDR graphics, 3D, text, computational layers, etc. Get a 30-day trial and try it!
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by DonHopkins on Thursday April 25, 2019 @02:34PM (#19751161)
Computational layers of lipstick. And rip-offs of stuff that's been around for decades, that Adobe didn't invent (like tabbed windows, which Adobe patented and sued Macromedia over, in spite of all the prior art).

https://en.wikipedia.org/wiki/Tab_(interface)#Patent_dispute

https://www.donhopkins.com/home/archive/emacs/to.jag.txt

https://en.wikipedia.org/wiki/Tab_(interface)#/media/File:Hy...

https://medium.com/@donhopkins/the-shape-of-psiber-space-oct...

Around 1990, Glenn Reid wrote a delightful original "Font Appreciation" app for NeXT called TouchType, which decades later only recently somehow found its way into Illustrator. Adobe even CALLED it the "Touch Type Tool", but didn't give him any credit or royalty. The only difference in Adobe's version of TouchType is that there's a space between "Touch" and "Type" (which TouchType made really easy to do), and that it came decades later!

Illustrator tutorial: Using the Touch Type tool | lynda.com: https://www.youtube.com/watch?v=WUkE3XLw_EA

SUMMARY OF BaNG MEETING #4, July 18, 1990: https://ftp.nice.ch/peanuts/GeneralData/Usenet/news/1990/_CS...

TOUCHTYPE Glenn Reid, Independent NeXT Developer

The next talk was given by Glenn Reid, who previously worked at both NeXT and Adobe. He demonstrated the use of his TouchType application, which should prove to be an enormous boon to people with serious typesetting needs.

TouchType is unlike any other text-manipulation program to date. It takes the traditional "draw program" metaphor used by programs like TopDraw and Adobe Illustrator and extends it to encompass selective editing of individual characters of a text object. To TouchType, text objects are not grouped as sequences of characters, but as individually movable letters. For instance, the "a" in "BaNG" can be moved independently of the rest of the word, yet TouchType still remembers that the "a" is associated with the other three letters.

Perhaps the best feature of this program is the ability to do very accurate and precise kerning (the ability to place characters closer together to create a more natural effect). TouchType supports intelligent automatic kerning and very intuitive, manual kerning done with a horizontal slider or by direct character manipulation. It also incorporates useful features such as sliders to change font sizes, character leading, and character widths, and an option which returns characters to a single base line.

TouchType, only six weeks in development, should be available in early August, with a tentative price of $249. BaNG members were given the opportunity to purchase the software for $150.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by Inityx on Wednesday April 24, 2019 @01:41AM (#19735840)
>porting it

Not to Linux :(

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by jchw on Tuesday April 23, 2019 @03:53PM (#19732214)
Qt Widgets is an amazing library, but honestly it is both more and less featureful than it needs to be in various cases. The rich text document stuff still holds up OK for basic cases, but I think the text rendering story could be a bit better. Last time I was doing low level text stuff in Qt, performance was not super impressive, and some of the APIs left a bit to be desired.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by jlarcombe on Tuesday April 23, 2019 @05:27PM (#19733065)
Well said. The notion that Qt widgets are "finished" was just an aspiration not to spend much more money on it I think; they sort of rowed back on this when it became apparent that Qt Quick isn't always appropriate, but by then it had sort of spread around as a "Qt fact" amongst people who didn't actually use it.

The number of rough edges, missing bits and outright bugs mean that it's certainly not "finished"... just like all software really.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by pjmlp on Wednesday April 24, 2019 @02:28AM (#19736042)
They helped spread the rummor when plenty of new features are QML only, specially when targeting non-desktop devices.

To this day if you want a common file dialog that works properly across all Qt deployment targets, you need to use QML, as the Widgets version is not adaptive and will display a tiny desktop common file dialog on an LCD display, for example.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by azernik on Tuesday April 23, 2019 @06:01PM (#19733398)
My preferred metaphor is to the RISC revolution. Just like RISC decoupled CPU design from programming language design (in the sense that hardware was often designed to make assembly coding easy), Vulkan has decoupled shader language design from driver writing. OpenGL was designed under the assumption that the general game-dev public would be writing shaders for direct consumption by the driver/hardware combo; Vulkan, on the other hand, seems to be designed to be a) written by a narrow group of game engine developers, and b) generated by compilers from higher-level shader languages.

(NB: I Am Not An Expert and these are my Uneducated Impressions.)

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by smallstepforman on Tuesday April 23, 2019 @08:08PM (#19734313)
Vulkan was primarily designed to allow issuing batch based (queue) validated instructions sets, issued from multiple threads. Lessons learned from OpenGL ES 2.0 showed only a subset of techniques is needed, hence the API is smaller. Shaders are precompiled. Smaller, simpler driver.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by flohofwoe on Wednesday April 24, 2019 @04:16AM (#19736484)
I think/hope the "endgame" for 3D APIs is that they disappear completely into compilers. Vulkan still has too many compromises and design warts to support different GPU architectures from high- to low-end and is already more complex than GL ever was after 25 years of development (just look at the huge extension list that already exists for Vulkan).

I don't need an "CPU API" to run code on the CPU in my machine, so why do I need to go through an API to run code on the GPU (hint: it's mostly about GPU makers protecting their IP).

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by imtringued on Wednesday April 24, 2019 @04:43AM (#19736600)
The irony is that the Raspberry Pi is basically a GPU chip with some small CPU cores tacked on. So you yes you actually need the GPU API to run code on the CPU.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by roenxi on Tuesday April 23, 2019 @08:33PM (#19734457)
> since that's easier than starting from scratch

That is not quite accurate, although it isn't far off. More accurately; the design mistakes that make/made X11 terrible were being enforced at the driver level.

Take the fact that for many years X was being run as root on linux. Horrific state of affairs for security. Everyone knows it is bad.

Some bright spark tries to write a new window system that runs as an unprivilaged user; and ran smack-bang into the fact that the drivers live in the window system because the Kernel doesn't accept closed source modules and the graphics vendors only support X.

That eventually got fixed with the Intel/AMD graphics graphics open sourcing 2008-2018; at the moment X is becoming a very thin comparability layer for most people and a mandatory pain for Nvidia users as far as I know.

There were a lot of issues like that, and still are with Nvidia. The point is that it isn't replacing X that is hard. The issues is coordinating with Nvidia is hard.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by IntelMiner on Tuesday April 23, 2019 @09:28PM (#19734776)
I orbit someone on the nouveau team, so I might be a bit biased with regard to Nvidia

As far as I can tell, Nvidia has two modes of operation with the Linux community, "hostile" and "inept"

Hostile is when they do things like require signed firmware for their GPU's or try to force their will on things like EGLstreams, while everyone else is using GBM

Inept is their situation with things like the Tegra mobile platforms. They simply use nouveau instead I'm told. Even though the two GPU lines of course, share a ton of engineering. For some reason they just decided it's easier to use nouveau on that side, and only that side

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by bscphil on Tuesday April 23, 2019 @11:52PM (#19735418)
>That eventually got fixed with the Intel/AMD graphics graphics open sourcing 2008-2018; at the moment X is becoming a very thin comparability layer for most people and a mandatory pain for Nvidia users as far as I know.

It's even better than that now. For me no part of X is running as root. Last I checked the only reason anyone had X as root (other than driver issues) was if they were running a graphical login manager). Since the login manager has to be up and running before any users are logged in, and likely requires X, it makes since that it's got to run in a privileged context, and works most easily as root. In my case I just use xinit to start my graphical sessions after I've logged directly into a (getty) terminal.

I think supposedly GDM can do rootless X, but I haven't tested that.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by rwmj on Wednesday April 24, 2019 @08:19AM (#19737615)
> Take the fact that for many years X was being run as root on linux.

Every other driver on Linux has a kernel part and a userspace API accessed through /dev devices or syscalls. It was always unclear why X needed to be any different, but I think this was more about implementation than something fundamental to X. Of course "X" is a lot of things to a lot of people, and it depends whether we're talking about the server, the protocol, the client, the extensions, the window manager, the widget library, etc.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by jolmg on Tuesday April 23, 2019 @02:19PM (#19731333)
> but I bet the original creators would be the ones most shocked that it's still a thing in 2019.

Couldn't we say the same thing about bash or basically most tools in your typical Unix-based OS? Old code is solid code. If they're to be shocked it's for doing something so right that it's persisted all this time.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by DonHopkins on Tuesday April 23, 2019 @02:22PM (#19731353)
Except that X11 isn't doing something so right -- it's still terrible, and it always has been, and we knew it was terrible at the time it was standardized.

But it's funny that you would bring up something as terrible as a shell scripting language like bash to compare to how terrible X-Windows is. Have you ever read through a gnu configure file yourself, or do you just close your eyes and type "./configure"? Who in their right mind would ever write a shell script, when there are so many real scripting languages that don't terribly suck universally available, that don't shit themselves when they encounter a file name with a space in it?

These quotes about X-Windows apply to bash as much as they do to X-Windows:

"Using these toolkits is like trying to make a bookshelf out of mashed potatoes." -Jamie Zawinski

"Programming X-Windows is like trying to find the square root of pi using roman numerals." -Unknown

https://medium.com/@donhopkins/the-x-windows-disaster-128d39...

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by jolmg on Tuesday April 23, 2019 @03:16PM (#19731889)
> as terrible as a shell scripting language

That's a strong opinion. I'm not going to argue for lack of time, but suffice to say that 99% of my interactions with my computer and sometimes with my phone is with a shell scripting language. Shell scripting is awesome.

> Have you ever read through a gnu configure file yourself,

Yes. Generated scripts make for a boring read.

> or do you just close your eyes and type "./configure"?

I do, from people I chose to trust, whether by running the package build scripts written by the package maintainers of my distribution or from github accounts that I judge as trustworthy.

There is a lot of trust involved in using a computer. I mean, if something nefarious might be in the ./configure script, it's more likely to also be in a precompiled program, since more people touched it.

> Who in their right mind would ever write a shell script,

I do.

> when there are so many real scripting languages that don't terribly suck universally available,

Each language is good for different reasons. Shell languages are meant primarily to be used interactively, as opposed to languages like python or ruby. The fact that you can put your everyday interactions in a file and run that is an added bonus.

> that don't shit themselves when they encounter a file name with a space in it?

I rather not have filenames with spaces if it means having a language that allows me to communicate with my machine in a terse manner, allowing for super-easy automation of all sorts of interactions.

I mean, are you really suggesting to mandate quoting of all strings in a shell language? The quotes are optional. That's good! In a shell language, files are basically your variables, so why would you want more syntax around your variables when working interactively?

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by overgard on Tuesday April 23, 2019 @10:30PM (#19735062)
Oh god there's so many easy reasons why bash is terrible.

* Significant whitespace in surprising ways (a=1 vs a = 1 or spaces following square brackets)

* Word splitting

* No data structures of note, nor any way to create them in any sort of non-hacky way

* No data types, really, for that matter

* Can't really deal with binary data

* Awful error handling

* Weak math

* Weird scoping rules

Honestly as soon as I have to do anything that involves a conditional I abandon bash and use one of the many ubiquitous scripting languages that has great library support for doing all the system stuff you could do from the command line anyway.

Here's a great list of BASH pitfalls: https://mywiki.wooledge.org/BashPitfalls I can't think of any language other than maybe Perl or C++ that comes close to that

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by jolmg on Wednesday April 24, 2019 @01:21PM (#19740662)
They all have reasons.

> * Significant whitespace in surprising ways (a=1 vs a = 1 or spaces following square brackets)

Variables in the shell are nicely coupled with environment variables. As a feature, you can do:

  a=1 b=2 cmd
to concisely assign environment variables for a single command. How would you recommend that be redone? You'd need additional cumbersome syntax if you want whitespace to not be significant, and that sucks for a language meant to be used mostly interactively:

  a = 1, b = 2: cmd
Because shell languages are meant primarily to be used interactively, we want to be very light on syntax. We don't want to have to say `var` or something before our variable definitions. We don't want to have more syntax than we absolutely need for our calls. Nothing like `cmd(a,b)`. cmd can be any string. They're just executable files in some directory. We want to include as many of them as possible, and their arguments can be anything, including `=`. Commands get as much freedom as possible over how they're called to fit as many needs as possible. So, how do you differentiate between calls and variable assignments?

Under those criteria, the current situation of statements being words separated by whitespace and the first words having `=` in them being assignments seems like the ideal solution.

> * Word splitting

Makes it easier to build commands without working syntax heavy complex data structures. Here's an example where word splitting is useful:

  sudo strace -f $(printf " -p %s" $(pgrep sshd))
> * No data structures of note, nor any way to create them in any sort of non-hacky way

Complex data structure lead to more heavyweight syntax, and part of the appeal of shell languages is that everything is compatible with each other because everything is text. If you add data structures then not everything is text.

> * No data types, really, for that matter

Same point as above. Everything being text leads to increased compatibility. I wouldn't want to have to convert my data to pass it around.

That said, you could say that there are weak-typing semantics, since you can do `$(( $(cmd) + 2 ))`, for example.

> * Can't really deal with binary data

Because everything is text to encourage easily inspectable data exchange and compatibility between programs.

That said, while it's not advisable to do it, binary data is workable if you really need to do that. Pipes don't care. I can pipe music from ssh to ffmpeg to mpv, if I want. One just needs to be careful about doing text-things with it, like trying to pass it as a command argument. $() will remove a terminating newline if present, for example. That makes sense with text, but not with binary data.

> * Awful error handling

I don't get this. I think bash has very good error handling. Every command has a status code which is either no error or a specific error. Syntax like `while` and `if` work by looking at this status code. You can use `set -e` and subshells to get exception-like behavior. Warnings and error messages are, by default, excluded from being processed through pipes. What do you find lacking?

> * Weak math

Sure. I'll give you that bash doesn't support fractional numbers natively. zsh does support floating point.

> * Weird scoping rules

It's dynamic scoping, and it does have some advantages over the more commonly seen static scoping. You can use regular variables to setup execution environments of sorts. This somewhat relieves the need to pass around complex state between functions. It's kind of a different solution to the same problem that objects in OOP address.

The only problem is that static scoping became so popular that people now are generally not even aware that dynamic scoping exists or how to use it, so it's now not recommended to use it to not confuse people that don't know that part of the language they're using.

About that, I wish people would just learn more of the languages they use, and not expect every language to work the same, as they're not all meant for the same purposes or designed by the same criteria.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by overgard on Wednesday April 24, 2019 @09:25PM (#19744164)
I think bash is fine as a shell and I understand why the syntax is the way it is, I'd just never use it for anything beyond a one liner or a list of commands. All my points were about its weaknesses for scripting, ie, anything that looks and acts like a program. There's basically no reason to use it that way when there are a million better programming languages that are ubiquitous and relatively small.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by jolmg on Thursday April 25, 2019 @11:15AM (#19749024)
It still seems better suited when the script is mostly about running executables and passing their inputs and outputs between each other. As an example, I think `pass` was very nicely chosen to be done in bash. I don't think there would've been any benefit in doing it in a non-shell language.

I also think that if a program's job is by good proportion about sourcing shell-scripts to e.g. prepare an environment for them and/or manage their execution, it's also a good idea to make that program in the same shell language. As an example of this, I think Archlinux's `makepkg` was best done in bash.

On why make a program that's about sourcing shell scripts at all, the shell is the one common language all Unix-based OS users know in common, pretty much by definition, so it makes it a good candidate for things like the language of package description files. Besides the fact that software packaging of any language involves the shell, you kind of expect people that call directly on `makepkg` to also want to be able to edit these files, so making them in the language that they're most likely to know is good.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by njepa on Tuesday April 23, 2019 @08:48PM (#19734546)
> That's a strong opinion. I'm not going to argue for lack of time, but suffice to say that 99% of my interactions with my computer and sometimes with my phone is with a shell scripting language. Shell scripting is awesome.

It really isn't though. (It certainly can be fun however). Switching from shell scripts, and avoiding to do things manually (like ssh), likely increases your success rate at managing *nix by orders of magnitude. All these "configuration management" tools like Puppet, Chef, SaltStack, Ansible etc. are pretty much just to avoid shell scripts and interactive ssh.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by jolmg on Wednesday April 24, 2019 @01:56PM (#19741065)
> All these "configuration management" tools like Puppet, Chef, SaltStack, Ansible etc. are pretty much just to avoid shell scripts and interactive ssh.

That's only true if your only use of the shell is for configuration, which isn't really intended to be the case. The shell was meant for any use of the computer, not just configuration. For example, I use ssh/scp when I copy some music files from my computer to my phone, or mpv when I want to play some music files. Indeed, I use the shell for nearly everything.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by pjmlp on Wednesday April 24, 2019 @02:33AM (#19736067)
> Each language is good for different reasons. Shell languages are meant primarily to be used interactively, as opposed to languages like python or ruby. The fact that you can put your everyday interactions in a file and run that is an added bonus.

While UNIX was playing with sh, there were already platforms with REPLs, graphical displays and integrated debugger.

In fact Jupiter Notebooks are an approximation of that experience.

So give me a REPL with function composition and structured data, over pipes and parsing text for the nth time.

Thankfully PowerShell now works across all platforms that matter to me.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by asveikau on Tuesday April 23, 2019 @04:55PM (#19732754)
> Except that X11 isn't doing something so right -- it's still terrible

Yet your windows render and take input, life goes on, etc. I am pretty happy with it on systems where it runs. Some of the old criticisms like it being a resource hog - might have made sense in the specs of, say, 1993 or earlier, but even restricting the comparison to what most of us have loaded in Javascript at any moment it's pretty lightweight.

> Have you ever read through a gnu configure file yourself ... Who in their right mind would ever write a shell script

I really don't think it's fair to use machine-generated code as an example of why you shouldn't use a particular language. All of those alleged universally available, "real" scripting languages that don't terribly suck would also look pretty bad if you turned them into a target language for GNU autotools.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by stormbrew on Tuesday April 23, 2019 @03:56PM (#19732249)
Shell scripting languages generally make certain common tasks easy that most other scripting languages do not. Namely, process management and especially piping information through those processes.

If that's most of what a program is doing I would 10000 times rather read a script written in bash doing it than a python script that pulls in 800 dependencies just to get halfway to making these sorts of tasks take less than 5 lines for each invocation of a thing that takes less than 1 line in bash.

That's not to say that bash is perfect, but it is very good at what it does.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by codedokode on Tuesday April 23, 2019 @04:31PM (#19732524)
Shell script also has dependencies: specific version of shell and CLI utilities. Shell script is a good thing when you need to write something quickly with hacks but it is not a good foundation for init system or build system. They easily break if you redefine variables like IFS, add command aliases or use names with spaces or special characters.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by grumpydba on Tuesday April 23, 2019 @06:18PM (#19733540)
> Shell script also has dependencies: specific version of shell and CLI utilities.

Just use posix stuff. And move on.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by hdfbdtbcdg on Wednesday April 24, 2019 @01:57AM (#19735909)
I'm curious.

How do you for example parse command line arguments in your shell scripts?

Do you regard sed, grep and awk as dependencies when bash scripting?

With regards Python. The subprocess, os, sys etc modules are standard library modules. There is no dependency overhead in using them. Most smaller Python scripts manage very nicely with the standard library.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by int_19h on Wednesday April 24, 2019 @02:31AM (#19736057)
For the kind of thing you've just described, a Python script would need just one dependency to do it all in roughly the same number of lines:

https://amoffat.github.io/sh/

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by bfrydl on Tuesday April 23, 2019 @04:58PM (#19732788)
> Who in their right mind would ever write a shell script

I quite enjoy writing fish scripts. Largely because I can actually remember the syntax for conditionals and loops.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by bsder on Tuesday April 23, 2019 @04:33PM (#19732548)
> Except that X11 isn't doing something so right -- it's still terrible, and it always has been, and we knew it was terrible at the time it was standardized.

And, yet, in ALL this time, not a single substitute arose?

We have multiple web browsers, GUI toolkits, IDE's, etc. all with far larger codebases and yet X11 never got replaced properly. And some really brilliant minds worked on it.

So the question you need to ask is "If X is so bad, WHY hasn't it been replaced?"

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by WillPostForFood on Tuesday April 23, 2019 @07:30PM (#19734068)
OTOH, Linux desktop marketshare hovers around 1-2%. So maybe the replacement for X11 has effectively been buying Windows or a Mac.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by michaelmrose on Tuesday April 23, 2019 @08:58PM (#19734599)
There is zero reason to suppose that the reason people don't use linux is X11.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by WillPostForFood on Tuesday April 23, 2019 @09:10PM (#19734678)
Sure there is, starting with the difficulty in setting up, getting it to output the correct resolution with your monitor, correct refresh rate, etc..
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by kiwijamo on Wednesday April 24, 2019 @03:43AM (#19736362)
It has worked automaticlly for me for the last decade using different distros and the *BSDs. I do remember all that trouble though when I started experimenting with Linux/BSD in the early 2000s.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by throwaway2048 on Tuesday April 23, 2019 @11:57PM (#19735438)
this hasn't been an issue in almost 20 years.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by WillPostForFood on Wednesday April 24, 2019 @11:23AM (#19739288)
Just google "can't get linux to display correct resolution"

You'll get plenty of results like this that are more recent than 1999.

https://ubuntuforums.org/showthread.php?t=2012264

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by michaelmrose on Wednesday April 24, 2019 @12:44PM (#19740215)
There are 2 things that cause this. Not having a driver installed and having it fall back to something which doesn't support the correct resolution or in fact bad cables.

Most user installs will not encounter either problem. New amd has great support out of the box without installing anything and many distros support installing closed source nvidia or will work well enough for non gaming applications with the open source drivers.

Please note that challenges aren't a result of X they are specifically the result of specific manufacturers drivers. Some of which have been more challenging in the past. For improvements on such in the future look to the manufacturers and support the ones that provide the optimal experience.

Please note issues where users can't set the correct resolution for their hardware ALSO occurs on windows 10.

Link from Winter 2018 https://troubleshooter.xyz/wiki/fix-cant-change-screen-resol...

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by throwaway2048 on Wednesday April 24, 2019 @05:18PM (#19742678)
Windows is never going to be ready for the desktop at this rate.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by int_19h on Wednesday April 24, 2019 @02:35AM (#19736074)
How many distros will install e.g. the proprietary (i.e. covering most recent hardware) NVidia drivers out of the box? If I remember correctly, Ubuntu only just now started doing this.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by throwaway2048 on Wednesday April 24, 2019 @06:39AM (#19737087)
You don't need the proprietary nvidia drivers to drive a display at native resolution.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by int_19h on Wednesday April 24, 2019 @05:53PM (#19742955)
You do need them if you want to use recent hardware, or get decent performance, or have working power management. From casual user's perspective, if this kind of stuff is not working properly, it's not really "set up".
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by pjmlp on Wednesday April 24, 2019 @02:37AM (#19736088)
Yet my open source AMD driver doesn't do everything that the deprecated fxglr was capable of, and even less than the DirectX 11 version of it.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by michaelmrose on Wednesday April 24, 2019 @12:46PM (#19740237)
Examples?
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by pjmlp on Wednesday April 24, 2019 @02:32PM (#19741422)
Brazos APU.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by michaelmrose on Wednesday April 24, 2019 @03:37PM (#19741924)
Good point. Historically AMD/ATI didn't provide official support for hardware for anywhere near as long as Nvidia and the open source gpu driver didn't provide near the same performance. For example devices could be available as new retail units one year and unsupported less than 3 years later.

To contrast that nvidia generally provided support for a decade. For example the latest release only days ago supports hardware as old as 2012 legacy drivers support hardware as old as 2003.

This is why I have bought nvidia hardware despite other issues however it looks like AMD open source support will be better going forward. This doesn't help anyone with old hardware.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by MagicPropmaker on Tuesday April 23, 2019 @07:42PM (#19734155)
Two good substitutes arose! The Microsoft Windows operating system's window manager, and the Apple OSX Window Manager.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by DonHopkins on Tuesday April 23, 2019 @04:43PM (#19732630)
That's like asking "If Trump is so bad, WHY hasn't he been impeached?" Just because something's hard to remove, doesn't mean it's not doing something bad.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by walshemj on Tuesday April 23, 2019 @04:52PM (#19732727)
I am very thank full that the plan to convert our entire engineering centre to some awful x windows tool set fell though at BT.

Though I still use the training I got in the accelerated 1 weekcrash course in unix we all did.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by mondoshawan on Tuesday April 23, 2019 @08:04PM (#19734291)
TBH, even humans shit themselves when they encounter monikers with spaces in them.

Can you spot the moniker with spaces in it in this sentence easily without having to go back and re-read? Without context, did I mean "moniker" or "moniker with spaces in it"?

Spaces are a terrible idea in monikers.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by torqueTorrent on Tuesday April 23, 2019 @07:56PM (#19734249)
On one hand, there are some things that are simply too complex to attempt implementation with bash a script.

otoh, there are many things that could or even ideally should be kept simple such that a bash script is the best practice, most simple, proven, reliable solution.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by DonHopkins on Tuesday April 23, 2019 @02:21PM (#19731339)
The reason X11 got pushed through so quickly 30 years ago was that some vendors were threatening to standardize on X10. Maybe they should have just gone with X10, because it would have been easier to eventually replace.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by rwmj on Wednesday April 24, 2019 @08:21AM (#19737626)
It's a real shame that MGR never got any traction (I think license problems and it came along too late). It was really "X done right". https://hack.org/mc/mgr/ https://en.wikipedia.org/wiki/ManaGeR
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by russed on Tuesday April 23, 2019 @04:10PM (#19732350)
This is exactly what I think when I hear "worse is better". Some software just needs to be right the first time.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by simion314 on Tuesday April 23, 2019 @03:22PM (#19731946)
X is good enough for majority of the users, even if the architecture is not perfect.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by mrb on Tuesday April 23, 2019 @05:44PM (#19733235)
The fact X11, as the "standard" windowing environment for Unix operating systems, was ditched by literally all major Unix operating systems created in the last 20 years like Mac OS X, Android, iOS, etc, tells us that X11 is not good enough.

For example here is an Apple developer explaining why X11 wasn't chosen for Mac OS X: https://apple.stackexchange.com/questions/168980/if-os-x-doe...

(By "Unix operating system" I mean an OS based on a Unix/Linux kernel.)

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by simion314 on Wednesday April 24, 2019 @12:57AM (#19735697)
What I said is that it works for majority of desktop users, the mentioned issues of tearing or security are non issue for this group of users. I know Wayland is supposed to be better because it is modern and has a better design but personally I won't swap something that works for something that is still not supporting all MY use cases (Wine) just because of theoretical benefits (for me for others there may be benefits like mixed DPI setups).

Conclusion I am not defending X11 architecture, but for a majority the features it has are good enough despite of the architecture and limitations.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by cmrdporcupine on Tuesday April 23, 2019 @07:45PM (#19734167)
Not to defend X, because it's awful, but Apple never made that choice. They inherited that choice from NeXT. And at the time that the engineers at NeXT made that choice (mid-late 80s) standardization of X11 was by no means assured.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by floatboth on Tuesday April 23, 2019 @04:26PM (#19732480)
Screen tearing, bad performance, bad touchscreen support (not independent of mouse cursor), and especially important these days: no real HiDPI support (practically impossible to support different scales for different monitors). It's not good enough.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by chmln on Tuesday April 23, 2019 @05:28PM (#19733075)
These claims are blown out of proportion and/or simply untrue.

Screen tearing: both Intel and AMD have hardware-backed "TearFree" buffering to prevent tearing. Bad performance: citation required - in my experience, Xorg is way faster. Touchscreen support - in most cases just works out of the box thanks to libinput. No HiDPI support for different scales per monitor - simply wrong - this is trivial with xrandr.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by blibble on Tuesday April 23, 2019 @05:45PM (#19733253)
I still find tearing to be problematic

I have a machine with a supported Radeon card (open-source driver), another machine with a supported nvidia card (binary blob driver), and another two machines using different intel onboard graphics chips (open-source driver)

the radeon and the intel (both drivers which work with it) have issues putting out a stable jitterless 60fps without tearing (with tearfree on, and various combinations of with/without compositing/glx/...)

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by chmln on Tuesday April 23, 2019 @10:15PM (#19734988)
How did you test the fps?

I'm using the intel driver as well, and it's definitely not perfect. But it's pretty close, at least for me - I get hardware-accelerated video decoding with VAAPI, no tearing, and excellent input latency (~3ms).

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by blibble on Wednesday April 24, 2019 @02:22PM (#19741346)
I've got a couple of videos I use that make the tearing/jitter obvious, e.g. https://www.youtube.com/watch?v=0RvIbVmCOxg (you can get a .mp4 too which eliminates the browser as a possible cause)

sadly I can see the jitter/tearing, vs. on Windows where it's perfect

(with 4k or higher frame rates it's far more obvious)

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by kevin_thibedeau on Wednesday April 24, 2019 @12:18AM (#19735517)
That's your video driver's fault. Not X's.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by curt15 on Tuesday April 23, 2019 @09:47PM (#19734856)
If you click and drag a window around in xorg, does the window stick perfectly to the cursor or is there still noticeable lag?
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by chmln on Tuesday April 23, 2019 @10:08PM (#19734943)
I use a tiling wm (i3), so I can't exactly drag windows around, but I can drag-and-resize them. In my case, there is no lag. However, there is a tiny amount of stuttering since I don't use a compositor, but I can live with that.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by yjftsjthsd-h on Wednesday April 24, 2019 @01:23AM (#19735779)
> I use a tiling wm (i3), so I can't exactly drag windows around, but I can drag-and-resize them

Sure you can. Just pop the widow into floating mode; I think the default is meta-space.

Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by andreyv on Wednesday April 24, 2019 @01:52AM (#19735885)
There is no tearing with proper drivers and window managers. This was a problem in the past, but now is largely overstated.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by rwmj on Wednesday April 24, 2019 @08:25AM (#19737657)
I never even knew what the problem was supposed to be. A window isn't rendered absolutely perfectly when I drag it around? How is that even an issue that anyone cares about?! Do you spend all day moving windows around? Compared to major flaws in Wayland like not being able to use a program at all on a remote desktop, it's trivialities.
Re:Why don't we have Wayland on Raspberry Pi yet? (2018) by amelius on Tuesday April 23, 2019 @03:10PM (#19731817)
Well at least it's the best kind of lock-in.