News for hackers. Stuff that matters.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by thechao on Thursday March 23, 2017 @11:51AM (#13940854)
Except that the abstraction layer for the user has remained the same.

The extra abstraction layers you're talking about are invisible to the user... while our GUIs are slower, and our processors faster. It feels like, after 30 years, we should be able to have our GUI cake and eat it, too.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by gvb on Thursday March 23, 2017 @12:33PM (#13941318)
The abstraction layer has only remained the same visually, and only for a loose definition of "visually."

In the "good old days" the user interface was 640px x 480px (original VGA[1], skipping past the original MDA, CGA, and Hercules graphics cards[2] since they predated "modern" GUIs). Then it was expanded to 800x600, etc. The programs of those days were hard-coded to the graphics adapter resolution. If a program did not support the graphics adapter you had, you had to run your GUI in lower resolution compatibility mode. Sometimes it didn't work at all.

In lower resolution compatibility mode, the program's display got uglier and uglier as the screen resolution went up.

The abstraction layer today is adaptive and high DPI. Since the abstraction layer abstracts away the actual display resolution, programs (generally) can take advantage of the resolution that is available on a given display without change, allowing a program to run on small hardware displays (phone/tablet form factor) up to mega 4K++ displays, looking better and better as the screen resolution goes up.

[1] https://en.wikipedia.org/wiki/Vga

[2] https://en.wikipedia.org/wiki/Hercules_Graphics_Card

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by pcwalton on Thursday March 23, 2017 @01:14PM (#13941760)
Precisely. And even Win32, which is being touted in this thread as somehow far superior to the Web stack, was never designed for high DPI apps. It's far worse than the Web stack, with exact pixel hardcoding everywhere. That's why the HiDPI situation on Windows is such an inconsistent mess. Meanwhile, the Web scaled up to HiDPI so seamlessly that most people never even noticed any friction. This is the benefit of the declarative model of CSS.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by kayamon on Thursday March 23, 2017 @05:05PM (#13944266)
Win32 was designed around DPI-independence from day one. That's why things like GetSystemMetrics exist. Unfortunately, the app developers chose not to use them.

GDI was originally designed to run on printers as well as screens, where the DPI values are completely different.

The declarative model of CSS has nothing to do with it. You can specify pixel values in CSS if you like.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by Sharlin on Friday March 24, 2017 @02:30AM (#13947089)
> You can specify pixel values in CSS if you like.

And many (most?) do... leading to the reinterpretation of what "pixel" means in the CSS spec. Yes, CSS pixel does not mean a physical pixel on the screen.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by pcwalton on Friday March 24, 2017 @02:39PM (#13951153)
> Win32 was designed around DPI-independence from day one. That's why things like GetSystemMetrics exist. Unfortunately, the app developers chose not to use them.

Integer pixel coordinates are right there in the most fundamental functions:

    HWND WINAPI CreateWindow(LPCTSTR lpClassName,
                             LPCTSTR lpWindowName,
                             DWORD dwStyle,
                             int x,
                             int y,
                             int nWidth,
                             int nHeight,
                             HWND hWndParent,
                             HMENU hMenu,
                             HINSTANCE hInstance,
                             LPVOID lpParam);
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by revelation on Thursday March 23, 2017 @02:18PM (#13942512)
WPF is perfectly fine for high DPI apps and still beats all this web stuff by orders of magnitude.

CSS people still think a grid is a choice of "small" "medium" and "large" columns/rows. Haha.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by pcwalton on Thursday March 23, 2017 @02:55PM (#13942952)
> WPF is perfectly fine for high DPI apps and still beats all this web stuff by orders of magnitude.

> CSS people still think a grid is a choice of "small" "medium" and "large" columns/rows. Haha.

CSS Grid is literally Microsoft taking the WPF grid layout and porting it to the Web!

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by revelation on Thursday March 23, 2017 @03:05PM (#13943064)
Yes, that is what I'm saying. They are not porting it because previous solutions have been just as capable.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by pcwalton on Thursday March 23, 2017 @03:10PM (#13943124)
But they did port it. That's why CSS Grid exists…
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by coldtea on Thursday March 23, 2017 @03:53PM (#13943587)
Yes, but his point is that for ages it didn't exist. Like, for 2 decades and something, was first tables, then "floats" BS.

And even now it's still not mature and supported in all browsers.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by smitherfield on Thursday March 23, 2017 @01:59PM (#13942285)
Isn't this a false dichotomy? Why not create more modern, declarative native APIs and libraries, or use them where they already exist?
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by posterboy on Thursday March 23, 2017 @04:24PM (#13943897)
> the old stuff worked just fine

> we don't need the new stuff

> how about we throw both away to shut everyone up, would that make either side happy?

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by khedoros1 on Thursday March 23, 2017 @05:14PM (#13944356)
How about: Take what we learn from new development so that we can improve the older, lower-level stuff, and strip away some unnecessary levels of abstraction?
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by josephg on Thursday March 23, 2017 @07:45PM (#13945387)
Yep. I did some swift development recently and while I absolutely loved the language I was struck with how much worse the uikit APIs are compared to react.

There's nothing special about javascript the language. The nice thing about web development is that the really fast framework iteration cycles. And everyone complains about them, but as a result we have some fantastic APIs for UI development in javascript land now. (Eg, react.)

What I want to see is someone port those lovely abstractions across to native languages. For example, a port of choo[1] to swift on top of uikit would be gloriously fast, efficient, small and easy to work with.

[1] https://github.com/yoshuawuyts/choo

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by pcwalton on Thursday March 23, 2017 @02:11PM (#13942419)
Because it's less effort and more likely to be successful to just improve Web implementations.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by smitherfield on Thursday March 23, 2017 @02:14PM (#13942463)
Sure, but it's also more likely to make my laptop with 16 gigs of RAM, 8 simultaneous threads and SSD feel more sluggish than the one I had 10 years ago.

Edit: I'll add, I frequently see people say that Windows XP was the best OS ever made. Why the rose-tinted glasses? It was the tail end of the era when hardware was getting faster, faster than software was getting slower.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by JustSomeNobody on Thursday March 23, 2017 @11:57AM (#13940928)
Where are the Michael Abrash's of today teaching people how to write tight, fast code? Seems a lost art...

Yes, I know, he's still around...

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by desertrider on Thursday March 23, 2017 @12:15PM (#13941125)
Luckily there are a few people that still care, just look at the response Handmade Hero has gotten.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by swah on Thursday March 23, 2017 @02:47PM (#13942838)
Those videos on data oriented design were also very interesting: https://github.com/taylor001/data-oriented-design

The thing is, using C++ instead of React for mobile development of a simple application would probably make me miss deadlines... So we just stick to whats popular.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by flukus on Thursday March 23, 2017 @08:03PM (#13945477)
Building UI's in something like Qt, GTK or swing was never really that time consuming, especially given the limited amount of controls one screen in a mobile app.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by criddell on Thursday March 23, 2017 @01:04PM (#13941660)
Except today's machine language is javascript.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by stickfigure on Thursday March 23, 2017 @12:29PM (#13941283)
Except that the abstraction layer for the user has remained the same.

This is absolutely not true.

Going to windowing GUIs from character-mode DOS was a massive usability improvement. No more exotic ctl-alt-function key combos (or control-control sequences for WordStar users like me).

Going from desktop apps to webapps changed the abstraction layer of how we access and share documents. No more installing software on the desktop. Docs are available on every computer we log into. Multiple people can edit the same document.

Maybe you don't care about document sharing and would be happy installing old school word processors and spreadsheets? That's a fair statement to make, but the market appears to be voting otherwise.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by wongarsu on Thursday March 23, 2017 @12:35PM (#13941344)
>No more installing software on the desktop

At least VS Code has to be installed. It is a plus for Google Docs & Co, but not universal. And in most cases, instead of installing you now have to create an account.

>Docs are available on every computer we log into. Multiple people can edit the same document.

Those features are completely independent from the platform the application uses. Those features are commonly implemented in web apps because for a long time they had no other choice, but cloud storage and collaborative editing can be equally well implemented in a destop application.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by dheera on Thursday March 23, 2017 @02:05PM (#13942355)
> Going to windowing GUIs from character-mode DOS was a massive usability improvement. No more exotic ctl-alt-function key combos

cough Blender ...

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by paulmd on Thursday March 23, 2017 @02:37PM (#13942730)
Unfortunately - the OSS world has a shortage of good UX people, and the engineers tend to be the ones steering the ship.

I would point to Eclipse as another classic example of "obviously designed by an engineer". There's tons of functionality under the hood and it's a fantastic jumping-off point for further customization... but its layout is intensely non-intuitive in so many ways compared to a purpose-built IDE.

Everything is locked away in menus and "perspectives". If you're writing a Java web app - do you want the Java perspective, the Java EE perspective, the Web perspective, or the Debug perspective?

I hear GIMP's no picnic to work with either but can't confirm personally.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by avian on Thursday March 23, 2017 @04:02PM (#13943681)
I fear the day "good UX people" come to GIMP and Blender.

It used to be that OSS was developed by people that actually used it. Maybe it wasn't pretty, it had a steep learning curve, but it got things done and was efficient once you learned how. Often you got fresh perspectives on how an interface could be done, since people got fed up with existing solutions.

Nowadays you get UX experts preaching how an interface is supposed to look like, which mostly means copying Apple or Google. You get tons shiny whitespace. Burger menus, because that's what "everybody is used to".

GIMP with "good UX people" would turn into a bad copy of Photoshop.

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by EamonnMR on Thursday March 23, 2017 @04:37PM (#13944020)
GIMP is pretty easy to pick up if you've used desktop apps before. It follows the sort of conventions you'd expect.. Blender, on the other hand, has a very unique approach to UX.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by santaclaus on Thursday March 23, 2017 @02:40PM (#13942760)
Well, that is true of nearly all 'pro' creative apps. Maya, Illustrator, ...