Live data from Hacker News

Fixing a 20-year-old bug in Enlightenment E16

iczelia.net

131–140 of 193 posts

Re: Fixing a 20-year-old bug in Enlightenment E16

#131
post #114

Earlier quoted context omitted.

> personal preferences instead of work around technical weaknesses These are the same thing. Your personal preference is my technical weakness. Everybody has different requirements. The scrollbar is a great example: There might be a use-case for the (absolutely abysmal IMO) disappearing scrollbar pattern gnome wants to push on people. Maybe it's screen real estate. Having a scrollbar on a tiny screen could be argued…

> Then it's not "exactly like" what I would do at all - you'd take your hand off your keyboard and switch to your mouse to use a graphical file manager tool. Definitely yes. That's what I'd definitely do. But there is no inherent reason for that. It just feels superior to me. Why should graphical applications be fundamentally worse (e.g. in terms of keyboard support) than terminal applications when terminal emulators…

  > Why should graphical applications be fundamentally worse (e.g. in terms of keyboard support) than terminal applications when terminal emulators are a graphical application?
Why don't you ask the makers of gui software?

> Yes. All these 800ms!

For you. This one time that you tested. It took almost an entire second. Or, another way you could say that would be "longer than it takes terminology to pop up a preview".

> Yeah, well, technically, of course. It just never felt like "waiting". It's a matter of milliseconds

Well then either dolphin is by some miracle orders of magnitude faster than any file browser I have ever seen (which includes earlier versions of dolphin that presumably have fewer features than the current one), or you're not viewing folders containing many files. Or maybe you just have the fastest and most powerful computer ever built. Or perhaps you just don't have any expectation of a performant UI and consider twiddling your thumbs to be no big deal.

> terminal applications don't need to enumerate directories when they deal with it? How does that work?

They do need to enumerate files, obviously, but they don't need to - for each and every file and subdirectory:

1. determine the mimetype for the tile, which may involve actually opening and reading the file

2. look up that mimetype in their "mime type -> friendly description" table

3. look up the default application that needs to be opened if you double-click on said file based on that mimetype

4. if the mimetype is "video" or "image", look in their cache for a thumbnail for the file, and if that doesn't exist fire up a thumbnailer to generate one, which likely involves opening and reading in the entire file.

6. load the aforementioned thumbnail into memory and display it in the appropriate place

7. as previously mentioned, enumerate and count the number of items in directories

8. I'm sure a bunch of other similar things that I can't even be bothered trying to remember right now.

  > Even if you just press "tab" in your shell, it will probably do exactly that, no? 
...interrogate every single file for its mimetype, load up a thumbnail for every single media file, and count the number of items in every single subdirectory? No, it will not do that when I press tab.

  > I really don't see why terminal applications should be fundamentally faster than graphical applications in that regard
..........um, what?

Seems to me like maybe you've never used a terminal program? Or perhaps you've never used a gui program? I'm not sure what to say to this. I don't think I've ever seen a piece of GUI software which comes close to the speed of its terminal-based equivalent. I'll grant you there are outliers, but those are rare and every single example I can think of doesn't use a GUI toolkit.

There are a few factors at play here. One big one (maybe the biggest?) is simply the complexity of the interface: Terminal emulators are built and optimised to display a whole bunch of text very quickly. They have one job: display text. GUIs and GUI toolkits, on the other hand, are huge complex libraries with a large number of different controls that they need to draw in the right place, do layout, have to deal with mouse interaction and event systems and the windowing system, deal with weird input methods and accessibility, etc etc etc etc etc etc etc. They're orders of magnitude more complex just in their interfaces. And that's before you start doing things like loading icons for every little button you're displaying and thumbnailing every media file in a directory so that you can load it as a pretty icon in your file manager. And before you start taking into account that a lot of gui software is just poorly written trash seemingly written by morons under the CADT model (Hi, gnome!).

GUIs are fine, and the best option for a bunch of things. But they're much MUCH less efficient than terminal-based programs.

I don't know what else to say. Go talk to every single GUI application author ever, I guess?

  > your terminal emulator is a graphical application, right?
Yes. One that's using a very limited set of GUI widgets compared to almost any other graphical program, and which has one job: display text. Indeed, the speed of terminals does have a marked effect on the speed of program execution in many cases: just try doing `time cp -Rv /usr /some/new/disk` - you'll spend a LOT of time just listing the hundreds of thousands of kilobyte-sized files you're copying, and the amount of text you're spitting out and scrolling your terminal emulator needs to do will slow down the file copying. If you compare this with `time cp -R /usr /some/new/disk` you'll find the non-verbose incantation to be much faster. Part of this is the fact that it doesn't need to run the printf statements, but much more of it is the time the terminal takes to output what is being printed, and especially scrolling. You'll also notice a pretty significant difference depending on which terminal you use - xterm will be faster than gnome-terminal, for example, because it's not bloated trash. KDE's terminal might be better than gnome's, but it will almost certainly not beat xterm. Nor will terminology. Similarly, running the verbose copy in a screen session and then switching to another 'window' in screen will speed up the copy, because even though it's verbose and running the printf statements, the terminal doesn't actually have to do the work of displaying the huge stream of text. Similarly, you can do a crude benchmark of your terminal's efficiency with bash by just spitting out a long line of text a million times and timing how long that takes.

  > If you know the file name starts with "cat_s", then you can also find it this way in Dolphin.
Sure. After you've waited almost an entire second, if you're lucky, for dolphin to start, and waited for it to enumerate all the files, and waited for it to count subdirectories, and waited for it to check its cache for thumbnails, etc etc etc etc etc etc.

Meanwhile, like I said, I'll already be half way through previewing the video, and my workflow won't involve switching to some worse program.

  > There are corner cases where I really search in a trickier, more dynamic way. Maybe with "find". Or five lines of Python scripting. But not hundred times a day. Definitely it's not worth rewriting every application now as a terminal app (that tries to be a graphical app via niche-in-niche technologies).
I'm not even sure what point you're trying to make here - that sometimes your preferred method is even more shit, and so you sometimes have to fall back to the one I default to? Who said anything about rewriting all programs for the terminal? Why would you do that? I already specifically said that "We do also use our graphical environment". Who said terminology is "trying to be a graphical app"?

  > Yes, that's one of the things that I feel so spooky with that approach.
I'm not sure why you insist on making this so complicated or acting like it's scary somehow.

  > It cannot work... 
I've already told you that it does, in fact, work. Very very well. Maybe you should try it out so that you have some idea what you're talking about before you start telling me that things I do all the time "cannot work".

  > Maybe for a handful of persons that constantly search for jpeg/png/mpeg files, in bulk mode, and need quick previews.
Did I say I use it "constantly"? I don't recall saying that. I use it as often as I need to. Because I can. Because it's there.

And it's a better experience in literally every way imaginable than firing up fucking dolphin and waiting for three ice ages and also an image/video viewer.

Re: Fixing a 20-year-old bug in Enlightenment E16

#132
post #70

Earlier quoted context omitted.

In a lot of cases, configurability is just a workaround for the issue that devs were unable to implement sth that just works 'fine'. So you could turn it on and live with its defects, or you turned it off and live without the feature. Linux Desktop was always full of that. But yeah, I also do not like Gnome, because they more and more just removed the switches, but without spending effort to make things fine for ever…

well why video in a terminal? 1. it's "free" because the toolkit already offers video objects - feature is there... why not expose it. you just call 2 lines of code or so and and tell it to play. it's similar amount of code for an image, so it's basically free really. why do still images and NOT video? why stop there when video is only a little more code. sure. if you want a movie as a background: probably a bad choi…

For those who don't know, rasterman was the original creator of Enlightenment.

His last comment before today was in 2016. And he came on today just to comment.

Thanks for making Enlightenment! I really enjoyed it for the brief time I used it!

Re: Fixing a 20-year-old bug in Enlightenment E16

#133
post #55

Earlier quoted context omitted.

Wasn't Enlightenment something that just looked good in screenshots (compared to Win XP or even earlier ones)? I love desktop environments that look nice, I love effects and animations, if done well, and I love to be able to customize things (KDE/Plasma is doing a really good job in that regard imho). But Enlighenment? Whenever some screenshots excited me, I gave it another try for some hours, and then went back to K…

> Wasn't Enlightenment something that just looked good in screenshots Yea, this was my memory of it, too. I remember installing it, and making a theme that looked all "elite" and cool. I added an anime character desktop background, as was required at the time. Took a few screenshots, basked in how cool I was, and then just switched back to whatever I was using before (I think Gnome).

> I added an anime character desktop background, as was required at the time

i always thought that "stone hand on desert island" was the #1 requirement for Linux desktop backgrounds of the time? ofc i can't find a pic of it now

edit: found it https://i.ibb.co/bgpRF6Y7/image.png

Re: Fixing a 20-year-old bug in Enlightenment E16

#134
I really enjoy a good bug report like this. More people should write up their fixes and publish them!

But the really weird thing is that I could basically copy and paste that code into an open–source game that I occasionally work on. I have an open bug or two about game items with long names that cause the UI to look weird where ellipsization is the obvious solution. With only a few trivial tweaks Enlightenment’s code would just work. It’s almost like we should have a library for that sort of thing.

Re: Fixing a 20-year-old bug in Enlightenment E16

#135
post #9

Oh, people are still using Enlightenment. My last time I used it was still in the 1990's, before I settled into Afterstep and soon afterwards Windowmaker. In what concerns my use of GNU/Linux, it was CDE on others. Apparently nothing big came out of Enlightenment and Tizen.

I still use Windowmaker in places like VNC desktops where GDM gets grumpy and breaks a lot of the functionality. It also works much better over X displays on high latency networks like the Internet, where it is using the X drawing primitives as intended instead of constantly doing client side rendering and blitting the results over.

Re: Fixing a 20-year-old bug in Enlightenment E16

#136
post #103

"Sadly, the hang was deterministic" No, no, you rejoice, a deterministic bug is the best sort of bug. because now you have a test case and a solid method to know when it is fixed. The sad bugs are the ones you can't find a test case for. I also got a bittersweet chuckle out of how the author considers it a lightweight environment, I mean, they are not wrong, but think of how far we have fallen when e, the ultimate bl…

But it is light weight. Fabulously so. The "bling" just comes from the ability to write theme files to customize the appearance of window decorations and menus. IIRC it was a fork of fvwm from way back in the day, and similarities can still be seen in the config files. I use it on everything including old 32-bit systems, and it's snappy and responsive everywhere.

GP means that 25 years ago, it was definitely not lightweight compared to many of the alternatives (GNOME and KDE being notable exceptions; I wouldn't have called them "light" back then either). Toady it's certainly light.

Re: Fixing a 20-year-old bug in Enlightenment E16

#137
post #20

Earlier quoted context omitted.

Funny, I was also one of those people who switched from E to WindowMaker. At the time I had no idea it resembled NeXTStep, but it was great. After that I changed to KDE 3 which was a major milestone at the time. I think GNOME at the time was technically superior though. Then shortly after I realized that desktop on Linux wasn't really going anywhere, so I switched to macOS (OS X at the time).

> At the time I had no idea it resembled NeXTStep, but it was great. I used (and still use) Window Maker for almost a decade before learning what NeXTSTEP actually was (i heard about the name occasionally but never looked into it), then for several years before even trying one. I remember having a heavy sense of uncanny valley because the thing in front of me looked almost exactly like what i was using for years but…

On the topic of lookalikes, remember good old fvwm95 ?

Re: Fixing a 20-year-old bug in Enlightenment E16

#138
post #133

Earlier quoted context omitted.

> Wasn't Enlightenment something that just looked good in screenshots Yea, this was my memory of it, too. I remember installing it, and making a theme that looked all "elite" and cool. I added an anime character desktop background, as was required at the time. Took a few screenshots, basked in how cool I was, and then just switched back to whatever I was using before (I think Gnome).

> I added an anime character desktop background, as was required at the time i always thought that "stone hand on desert island" was the #1 requirement for Linux desktop backgrounds of the time? ofc i can't find a pic of it now edit: found it https://i.ibb.co/bgpRF6Y7/image.png

Ohh, I've never seen that wallpaper before... Looks so year 2000-ish... :)

And then you start some actual (non-E) applications...

Which look completely different (i.e. not like something that MS Frontpage has desperately assembled out of Java Applets and weird color choices)...

And then, even if you liked the original look, you'll not be satisfied at all anymore, will you?

Yeah, okay, on the other hand, you could probably find Qt and GTK themes that somehow looked similar enough...

Re: Fixing a 20-year-old bug in Enlightenment E16

#139
post #90

I liked the author's pragmatic take on the stability. Indeed that running bleeding edge now has implications to greater attack surface as the supply-chain attacks getting more and more common. A nice and sincere excerpt from the recent past... > Back when the XZ backdoor was introduced, I was scrolling through news on my Debian Sid laptop with some code compiling in the background. I learned of a backdoor in XZ Utils…

To put a finer point on it: running bleeding edge does not just now have implications of a greater attack surface, it always has had such implications. It's just that a tiny fragment of people are suddenly becoming aware of this fact (the masses always remain clueless), whereas others have known it for some time. These people are referred to as "crazy tinfoil hat nutters."

Eh, there are two competing drives occurring here.

Back in the day before security was the biggest driver of updating software most people stayed a version or two back to ensure they weren't getting the last corruption bug of the day or whatever other insect was coded in.

But modern internet connected systems have pushed customers into more of an issue. It switched from, stay a version behind to see what bugs are there to, if you don't update now you're going to get hacked.

So this is the situation at hand.

If you don't update you're going to get hacked.

If you update you're going to get hacked.

Re: Fixing a 20-year-old bug in Enlightenment E16

#140
post #113

Earlier quoted context omitted.

> or whatever the tycat thingy understands You're missing the point, which is that the EFL library just has media playback built into it - for a lot of different formats. Like Carsten mentioned, tycat doesn't do anything special, it just emits the right escape sequences to tell the terminal "display file X". And then terminology just says "hey media library, give me a player for file X". tycat doesn't need to know or…

> You're missing the point, which is that the EFL library just has media playback built into it - for a lot of different formats. As far as I understand, you're missing the point. Every format that someone now wants to handle on terminal, needs to be supported by the EFL library?! Does it support LO spreadsheets? PDFs? Audacity projects? Raw camera images? HTML? Yes? And now I want to switch away from LO to some very…

  > Every format that someone now wants to handle on terminal, needs to be supported by the EFL library?! Does it support LO spreadsheets? PDFs?
Why would you want to work with a spreadsheet in the terminal when there's a perfectly capable spreadsheet application right there?

But if you want to be able to preview libreoffice spreadsheets or PDFs in terminology - and also incidentally and for free every other EFL project which uses that control - I'm sure they'd be happy to look at your pull request.

  > And now I want to switch away from LO to some very new office tools, and I cannot, because EFL doesn't support it yet?
What?? so you open your preferred office tool. From terminology if you want to. I don't see why this is so difficult to understand? What about what I'm describing inhibits you from editing a spreadsheet in your spreadsheet editor?

  > And all that just in order to show some previews in a terminal emulator instead of the graphical environment around it that is perfectly capable to do so since half a century? Where all the applications already exist?
And all what? Raster already explained that it's like 3 lines of code.

The graphical environment might be able to do the same job, but as I've pointed out time and time again, it can't do it nearly as quickly or as fluidly when I'm already working in a terminal. We've been over this ad nauseum, but I'll just point out for the 30,000th time that all the ways you talk about involve opening up some other, slower program and switching away from the teminal. Which is a less seamless experience than just viewing the thing right there in the terminal. I don't know how I can state it any more clearly.

Did I say "editing the thing" or "working with the thing"? No, no I didn't say that. Because I didn't mean "Editing" or "working with".

  > Fine. Just replace tycat with EFL in what I wrote before
OK so just to clarify: your complaint is that in order to be able to view a file of a particular format, EFL needs to be able to... parse that file format? ...Like every piece of PC software ever made?

  > But it's artificial. It solves a problem that just doesn't exist at all, and it doesn't actually improve anything, as long as it's not universally supported (at least in an actual Linux virtual terminal outside of X11/Wayland).
You don't know what you're talking about. It does indeed solve a problem. It could allow an entirely new class of incredibly rich hybrid terminal/gui applications, for one thing. And I've already given examples of it tangibly improving things. Just because you don't understand doesn't make it useless.

  > But why are you trying to improve the horse riding experience, if you actually have a car that is just artificially stripped down to feel like a horse? Just use the car as a car instead! ;)
By your analogy, a GUI application is somehow better than a terminal one. Which it just isn't. You've got things backwards. A car that's stripped down to feel like a horse??? What the fuck are you on about?

  > What context switch are you talking about
For the fifty-thousandth time: launching an entirely new application, waiting a geological age while it gets its shit together, switching to it, getting my bearings, and finally actually viewing the file.

  > Why can't the same folks not improve keyboard support in e.g. VLC? 
How would that relieve me of the need to start VLC in your suggested workflow?

  > I would be surprised if VLC is worse in that regard than some terminal thingy
Who said anything about running a media player in a terminal?

(btw, off-subject, but there are a couple of really great terminal-based media players. And I can pretty much guarantee their keyboard controls are superior to vlc. But I'm not sure because I don't really try to keyboard control VLC. Because I don't have to. Because I don't have to launch it to preview a media file)

> You fire up a new tycat instance instead. Here VLC takes, idk, 500ms?!

I just fired up VLC. It took about 3 seconds (that's 3000ms, but what's 600% between friends?) from launch to a window being visible. According to htop, that empty VLC window with no file opened used up about 100Mb of my memory.

conversely:

  $ time tycat /path/to/some_video.mp4
  real 0m0.142s
  user 0m0.117s
  sys0m0.043s
I wasn't able to easily determine the ram used by tycat, because it closes so fast. But given how complicated it isn't, I'd expect it to be measured in kilobytes. I can (and have) written a bash script which is a very close equivalent to tycat as part of my command not found handle. It's 1.3Kb.

  > What's the difference? 
Well, about 2858ms, give or take. Or if you prefer: about 95.2%. And about 100Mb of RAM, give or take. And a context switch. And me taking my hand off the keyboard.

  > Yeah, make them universally work on any virtual terminals, and then it'd be at least an interesting discussion
Feel free to submit a PR to the makers of your preferred terminal. Or you could switch to a terminal that's less shit than the one you're using.

Why do you expect me to care what terminal you're using? Do you think I write software in the hope that you in particular will use it? If you want to use worse software and not be supported by my terminology-specific stuff, be my guest.

  > As long as I need some E terminal, or a particular terminal that is "popular with the kids"
When did anyone say you needed it or had to use it? I encouraged you to try it so that you might come off as less totally ignorant, but you're free to keep using your less-capable terminals and the worse software that works on them if you like. I don't actually care what you use.

  > I really don't see at all why this is a good idea to spend any efforts for
No, you really don't.

Just remember to go and set your terminal to not support colour - after all it's not supported by any of those amber-screens! And while you're at it you better disable those extended unicode characters and switch back to baudot code. You can probably find a punchcard reader if you look around.

  > Just use the car as a car, instead of disabling the engine, pretending it to be a horse, and then find clever ways to make it feel more like a car again. It already _is_ a car. Don't make up artificial restrictions that do not exist, just in order to find mediocre ways to somehow patch parts of them away a bit.
Your analogy is so hilariously flawed and backwards. It's very clear you don't understand. "disabling the engine"? Lol.

No.

Your terminal emulator is a horse. A tired, old horse. That's gray and boring and totally uninteresting. So uninteresting that you haven't even noticed it's got an infection in its foot.

Meanwhile, my terminal emulator is a horse with cybernetic legs and wings that allow it to break the sound barrier, and also fly. And if I keep messing around a bit I might be able to get it to do even more cool stuff. Who knows what exactly? Will all of it be groundbreaking and super useful immediately? Maybe not. But it'll be fun and interesting and it can already do shit you never even imagined was possible and can't even comprehend when I tell you about it, insisting on asking backwards questions like "well yeah but if it's flying then what happens with the horseshoes?"

Have fun with your old nag!

  > Give Dolphin a chance!
If I'm being honest, the chance of me ever trying any kde trash again is about 0.1%. Which in its defense is about 50 times more likely than me trying gnome trash. I'm sure it's just as bloated as the other ten thousand bloated file managers.

"patched terminal font"?? What the fuck are you talking about?? It's almost like you don't understand what you're talking about.

  > Bonus: It can display emojis
Your file manager can display emojis? Whoop-de-doo. Welcome to like, idk, 2010? Probably earlier tbh. Or are you bragging that your teminal emulator can display emojis? Like every terminal emulator I've seen for a very long time can, and like terminology could i don't even know how long ago because I've never seen it not do it.

  > because the actual glyph width differs from what the "API" (i.e. dancing some escape sequences and somehow intercept the answers from somewhere) tells you.
I'm just going to respond to this with something exactly as sensible and coherent. Here goes:

Argle bargle snerf blu carn delg bling blong blu barg sneh bork mert.

Post reply on HN