Desktop compositing latency is real - <AUTHOR> http://www.lofibucket.com/articles/dwm_latency.html <comment><USER2> I've been experimenting with this too, in the context of the Windows front-end for xi editor. It's absolutely true that the compositor adds a frame of latency, but I have a very different take than "turn it off."

First, it's possible to design an app around the compositor. Instead of sending a frame to the system, send a tree of layers. When updating the content or scrolling, just send a small delta to that tree. Further, instead of sending a single frame, send a small (~100ms) slice of time and attach animations so the motion can be silky smooth. In my experiments so far (which are not quite ready to be made public but hopefully soon), this gets you window resizing that almost exactly tracks the mouse (as opposing to lagging at least one frame behind), low latency, and excellent power usage.

Further, Microsoft engineers have said that hardware overlays are coming, in which the graphics card _pulls_ content from the windows as it's sending the video out the port, rather than taking an extra frame time to _paint_ the windows onto a composited surface. These already exist on mobile, where power is important, but making it work for the desktop is challenging. When that happens, you get your frame back.

So I think the answer is to move forward, embrace the compositor, and solve the engineering challenges, rather than move backwards, even though adding the compositor did regress latency metrics.

Edit: here's the talk I was referencing that mentions overlays: [https://www.youtube.com/watch?v=E3wTajGZOsA](https://www.youtube.com/watch?v=E3wTajGZOsA)

<comment><USER3> How are you testing the mouse cursor following the window borders on resize? I've read that windows turns off the hardware sprite mouse cursor when resizing windows so that it can software render it to always line up properly.

<comment><USER2> Visual inspection for now. I've got an Arduino and a high-speed camera, so my plan for the next step is to send mouse and keyboard events from the Arduino, blinking an LED at the same time, then capture both the LED and the monitor in the video. Then a bit of image analysis. This is the only way to be quantitative and capture all the sources of latency.

<comment><USER3> The implication of what I was saying is that windows will always show the cursor lining up with the border of a window during resizing.

<comment><USER2> Would that it were so.

<comment><USER4> Hmm, are you inspired or were part of [https://github.com/google/walt](https://github.com/google/walt) ?

</comment></comment></comment></comment></comment></comment><comment><USER5> This is also why picking a good monitor is important for software development.

Some monitors have tons of input lag (60-70ms) and that's the time it takes for you to see what you're typing to reach the display. This also includes the time it takes to see you move your mouse cursor too.

I did a huge write up on picking a good monitor for development which can be found at: [https://nickjanetakis.com/blog/how-to-pick-a-good-monitor- fo...](https://nickjanetakis.com/blog/how-to-pick-a-good-monitor-for-software- development)

I ended up buying the Dell UltraSharp U2515H [http://amzn.to/2jF3WHp](http://amzn.to/2jF3WHp). It has very low input lag (10-15ms) and it runs natively at 2560x1440.

<comment><USER6> "I can send an IP packet to Europe faster than I can send a pixel to the screen. How f'd up is that?" \- John Carmack

<comment><USER7> Right, the issue is that 60Hz is ridiculously slow. Ethernet hardware is multiple orders of magnitude faster. It's just because of broadcast TV and CRT legacy. G-Sync / FreeSync allow up to 240Hz, which is ~4ms latency.

<comment><USER3> No, the issue was that he was using a display with a crazy amount of buffering because they were doing so much filtering and doing it poorly.

<comment><USER8> It's not just monitors even keyboards can have 40+ms worth of delay and it all adds up.

<comment><USER3> I don't think that was what he was referring to

<comment><USER8> "I video record showing both the game controller and the screen with a 240 fps camera" [https://superuser.com/q/419070/2269](https://superuser.com/q/419070/2269)

So, it's total response times from key press on a game controller to screen that is important not individual components. Sure, 0.04 seconds on it's own is not a big deal, but when 5 or six things take 0.04 seconds you hit noticeable delays.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> I will gladly believe this is a real problem, but this page does _not_ demonstrate that (at least not convincingly); the metric used is simply too poor.

To quote:

> I used my own hacky measurement program written in C++ that sends a keypress > to the application to be benchmarked. Then it waits until the character > appears on screen. Virtual keypresses were sent with WinAPIs SendInput and > pixels copied off screen with BitBlt.

So, this is measuring some rather artificial and fairly uninteresting time.

You really do need to measure the complete stack here, especially if your theory is that issues like vsync are at stake, because the level at which vsync happens can vary, and because there are interactions here that may matter. E.g. if there are 100 reasons to wait for vsync, and you remove one of them... you're still going to wait for vsync. It's not 100% clear that this measurement actually corresponds to anything real. Also, note that a compositor need not _necessarily_ do anything on the CPU, so by trying read back the composited image, you may inadvertently be triggering some kind of unnecessary (or OS-dependent sync). E.g. it's conceivable that regardless of tearing on screen you want the read-back to work "transactionally", so you might imagine that a read requires additional synchronization that mere rendering _might_ not.

And of course: all this is really complicated, there are many moving part's we're bound to overlook. It's just common sense to try to measure something that matters, to avoid whole classes of systemic error.

Ideally, you'd measure from real keypress upto visible light; but at the very least you'd want to measure from some software signal such as SendInput up to an hdmi output (...and using the same hardware and as similar as possible software). Because at the very least that captures the whole output stack, which he's interested in.

Another advantage of a whole-stack measurement is that it puts things into perspective: say the additional latency is 8ms; then it's probably relevant to know at least roughly how large the latency overall is.

<comment><USER10> The time measured is artificial but not necessarily uninteresting. You can't measure the true end to end latency this way, but you can compare different user applications to see how much latency they add. It's not perfect but it is the best available way to measure latency of arbitrary applications without extra hardware.

I built a browser latency benchmark based on a similar method: [https://google.github.io/latency- benchmark/](https://google.github.io/latency-benchmark/)

I did plenty of testing and found that the measurements obtained this way do correlate with true hardware based latency measurement.

All that said, it is a travesty that modern OSes and hardware platforms do not provide the appropriate APIs to measure latency accurately. A lot of what is known about latency at low levels of the stack is thrown out before you get to the APIs available to applications.

<comment><USER9> I'm sure they correlate: but the thing with correlation is that you can have correlation even when there are whole classes of situations where the relationship doesn't hold.

On the same os +drivers I'd be willing to believe that this measure is almost certainly useful (even there, it's not 100%). But it's exactly the kind of thing that a different way of, say... compositing... might the implementation to work a little differently, such that you're comparing apples to oranges. If BitBlt simply gets access a little earlier or later in the same pipeline and hey presto: you've got a difference in software that is meaningless in reality.

</comment></comment></comment><comment><USER11> > Don't you find it a bit funny that Windows 95 is actually snappier than > Windows 10? It's really a shame that response times in modern computers are > visibly worse than those in twenty years ago.

My Amiga A1200 (Only have extra RAM) feels faster and more responsive that any modern computer with Windows or GNU/Linux desktop.

<comment><USER12> Layers of abstraction take you further away from the metal. The more layers of abstraction your keypress must traverse before rendering is complete and the photons have reached your retina, the longer it will be until that happens.

Layers of abstraction make complex tasks more reachable by a larger number of programmers by reducing the amount of specialist knowledge about those lower layers required to do the job. The more layers of abstraction you have, the less they have to worry about lower levels and can just get on with what they want to do.

<comment><USER13> Numerous games, including those having complex graphics and behavior, can render 120+ frames per second and realtime interactions (physics, optics, reactions) on pretty average hardware. I don't think that game scripters who make final things like scenery or ui face complexity much harder than those in gtk/qt/wpf/htmljs widget programming. Details would be interesting though, since I'm no game developer.

If true, it must be something very wrong with traditional ui systems?

Edit: my apologies, I didn't read the article first and thought it measured complete feedback like "press ctrl-f and wait for element to popup", but I'm interested in my question regarding games anyway.

<comment><USER14> There isn't much of a difference between a GUI toolkit you'd find in a desktop application and the GUI framework you'd see in a game - the most likely difference will be that the game GUI will be redrawn every frame whereas the desktop GUI wont (and there are game GUI frameworks that cache their output to avoid redrawing the entire widget tree every frame).

The difference when it comes to why games can be snappier is that games are "allowed" to bypass most of the layers and cruft that exists between the user and the hardware, including the compositor that the linked article is talking about (in Windows at least).

Fortunately in Linux with Xorg you can get stuff on screen as fast as the code can ask for it, as long as you are not using a compositor (so you can even play games in a window with no additional lag!).

Hopefully the Wayland mania wont get to kill Xorg since yet another issue Wayland has and X11 doesn't is that with Wayland you are forced in a composition model.

<comment><USER15> The funny thing is that there is no technical reason at all for compositing to have worse latency, even for games.

Think about the actual operations that are involved. You certainly never want to render directly into the front-buffer (you'd end up scanning out partially rendered scenes). So you render to a back buffer. Which you then blit to the front buffer (assuming you're in windowed mode; in full-screen mode the compositor goes out of the way anyway and lets you just flip).

The only difference between the various modes of operation is who does that final blit. In plain X, it's the X server. In Wayland, it's the Wayland compositor. In X with a compositor, it's the compositor.

Now granted, some compositors might be silly and re-composite the whole screen each frame, but clearly that can be avoided in most cases.

Depending on the setup, there can also be some issues with the scheduling of the game's jobs vs. the compositor's jobs on the GPU. Valve are working on this currently for VR, since the problem is much more noticeable there -- clearly it can be fixed one way or another (on Radeon GPUs you could do a blit via asynchronous compute if need be, for example), but note that compositing actually doesn't change this issue (since the X server's jobs also need to compete with the game's jobs for scheduling time).

So if compositing has worse latency, it's because nobody has cared enough to polish the critical paths. Conversely, compositing clearly does have advantages in overall image quality. So why not fix the (entirely fixable) technical problems with compositing?

<comment><USER14> There is a very good practical reason why the compositor is in no position to fix that even if it could theoretically be possible.

A major source for the compositor latency (or actually, the increased response time you get with a compositor) is that the "render to back buffer" (ie. compositor's texture, at the best case) and the "blit to the front buffer" (which happens by the compositor by drawing the window geometry) do not happen at the same time.

From a technical perspective it is perfectly possible for a compositor to create a tight integration between a program and the compositor itself: simply synchronize the program's updates with the compositor updates. Every time the program says "i'm done drawing" (either via an explicit notification to the compositor, via glXSwapBuffers or whatever), issue a screen update.

The problem however here is the compositor has to take into account multiple windows from multiple programs so you cannot have a single window dictating the compositor updates. Imagine for example two windows with animations running, one at 100fps and another at 130fps. Depending which window is active (assuming that the compositor syncs itself with the active window), it would affect the perception of other window's updates (since what the user will see will be at the rate of the foreground window's update rate). Moreover, beyond just the perception, it will also affect the other windows' animation loops themselves - if a background window finishes drawing itself and notifies the compositor while the compositor is in the middle of an update, the background window will have to wait until the update is finished - thus having the foreground window indirectly also affect the animation loops of the background windows. This can be avoided through triple buffering, but that introduces an extra frame of latency - at least for background windows.

So to avoid the above problems, what all compositors do is to decouple window update notifications from screen updates and instead perform the screen updates at some predefined interval - usually the monitor refresh rate and they do the updates synchronized to it. However that creates the increased response time you get with the compositor being on a few milliseconds behind the user's actions, with the most common example would be window manipulation like resizing and moving windows lagging behind the mouse cursor (which is drawn by the GPU directly, thus bypassing the compositor).

Hence the linked article recommending a 144Hz monitor to avoid this, although this is just a workaround that makes the problem less visible but doesn't really solve it.

<comment><USER15> This "do not happen at the same time" is true in plain Xorg as well, though, since the final blit to the screen happens in the X server and not in the application.

Your example of 100fps vs. 130fps on the same screen is inherently unsolvable in a proper way with anything less than a 1300fps display. So you have a bunch of tradeoffs, and I'm sorry to say that if the tradeoff you prefer is tearing, you're in the losing minority by far.

That said, if you truly wanted to write a tearing Wayland compositor, you could easily do so, and in any case plain X is still going to work as well.

<comment><USER14> Without a compositor, when you ask to draw a line, a rectangle, a circle or even a bitmap, it is drawn immediately. Sure, it isn't done in zero time, there is some latency, but that is the case with any graphics system :-).

As for the compositor, it isn't impossible to create a Wayland "compositor" that draws directly on the front buffer either, it is just harder and pointless since Xorg exists :-P.

But yeah, if everyone abandons Xorg (and by everyone i mean _Everyone_ , not just the popular kids) and nobody forks it (which i doubt it'll happen as there are a ton of people who dislike Wayland) and nobody else steps up to do something about it, then yeah, i'll most likely just make my own suckless Wayland compositor. I'd prefer the world to stay sane though so i can continue doing other stuff :-P.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> I recently measured it with my phone's camera in slow motion mode. The system is an AMD Ryzen 1800X with AMD R9 280x GPU, KDE Plasma with KWin window manager in compositing mode. Key press to screen output latency was ~33 millseconds (90 fps recording, so increments of 11) in KWrite. The computer feels plenty responsive with that latency, and I hate latency...

It is a full stack real world result - for comparison purposes it makes sense to measure only the software as in the article, but in reality you want to optimize everything. Especially screens can be quite bad - tens of milliseconds, up to 100 in the worst. USB lag is usually quite low - when I measured it once for low-latency serial comm it was usually < 2 ms.

<comment><USER17> 33 ms is two frames, if your monitor is at 60 Hz. If you tried vscode or other electron app, it might be 49 ms (3 frames). These are the numbers I'm getting from 1900X with Nvidia 1080 GPU, Gnome3, 4k@60hz, but without measuring latency of the keyboard itself.

Modern keyboards are another part of the problem. They can also take their sweet time since keypress until packet appears at the USB bus. See [https://danluu.com/keyboard-latency/](https://danluu.com/keyboard-latency/)

<comment><USER18> Modern motherboards often still have a PS/2 port! And most USB keyboards still support PS/2, a passive adapter works great.

<comment><USER17> The problem is often in keyboard controller, not in the interface. Apple managed to get fastest keyboard with only 15ms lag; other may be order of magnitude slower.

<comment><USER19> Could someone explain to me why on earth 15ms of lag for a key press is considered good? It is a switch for gods sake. It should be near instant.

<comment><USER17> The linked article explains it (TLDR: key travel time, scanning keyboard matrix, debouncing).

<comment><USER20> It's a common myth that denouncing needs to meaningfully affect latency. It does not. It will affect maximum repeat rate, but you can pretty much report an event the moment you see an edge.

</comment></comment></comment></comment></comment></comment></comment><comment><USER21> Someone recently gave me an old PowerBook G3, running Mac OS 8.6. I was amazed by how responsive the UI is compared to today's UIs, from Mac to Windows to iOS to Android. When I clicked something, it felt like there was a pushrod between the mouse button and the menu, which triggered it instantly.

<comment><USER22> Well compositing was introduced in 10.2, I'm not sure if running Classic Mac OS was an advantage in this case

<comment><USER23> Did you use OS X prior to 10.2? I guarantee you it was slower and worse in every way. Especially compared to classic. There is a reason they continued installing OS 9 side-by-side before 10.2.

<comment><USER24> OS X did compositing on the cpu before Quartz Extreme in 10.2

</comment></comment></comment></comment><comment><USER25> > Virtual keypresses were sent with WinAPIs SendInput and pixels copied off > screen with BitBlt.

This methodology alone could account for the differences in timing between Win7 and Win10. For all we know, Win10 could just be slower at getting the pixels back to the program from BitBlt, or SendInput could be slower triggering events, or a multitude of other issues.

The best way to truly detect key-to-photon latency is with an external video recorder that has both the screen and keyboard in frame. Grant a few ms of noise for key travel distance.

<comment><USER26> As I understand it:

\- Compositing is done on the GPU

\- BitBlt is done on the CPU

\- Copies from GPU -> CPU are slow

So, yeah, compositing adds a frame of VSync latency, but these measurements are complete bunkum.

<comment><USER27> BitBlt is done in DMA ram by the CPU, so it may be even worse than just a copy as there is likely a wait involved too to prevent shared access. Using DMA ram prohibits the GPU/Driver from doing optimizations on that ram that it could do if the buffer was in dedicated gpu-ram. This is why DX12 resources are generally always copied into non-shared buffers.

</comment></comment></comment><comment><USER28> That's why I prefer to play games in fullscreen as opposed to "borderless windowed", I have noticed quite a bit of input lag in the latter mode.

<comment><USER29> This is because fullscreen mode allows the use of something called "DirectDraw Exclusive mode" which bypasses Windows for making calls to the GPU.

[https://msdn.microsoft.com/en- us/library/windows/desktop/dd3...](https://msdn.microsoft.com/en- us/library/windows/desktop/dd375451\(v=vs.85\).aspx)

<comment><USER30> I wonder if it would be feasible to use this to reduce input lag in an editor?

<comment><USER31> Yes, but you lose access to any user interface components you don't paint yourself, and you can eat some lag/flickering when switching out of the app as control is returned to the compositor. If you end up needing to show the Open File picker from the OS or pop up the Print dialog you'll need to exit exclusive mode.

</comment></comment></comment></comment><comment><USER32> This article is about Windows, but I wonder how Wayland on Linux measures up.

<comment><USER33> Wayland does everything with compositing. The Wayland people love v-sync because they hate tearing. So chances are that this effect applies...

<comment><USER34> And then Gnome goes and builds on that by hooking the mouse pointer up to the redraw...

</comment></comment></comment><comment><USER35> I would like to see end-to-end measurements (=high speed camera footage analysis) before making final conclusions. Not saying that compositing doesn't add latency, but I feel like the system is so complex that this sort of userspace software measurement might not tell the whole story

</comment><comment><USER36> My work laptop (the only Windows computer I use) runs Windows 7, and I intend to keep it that way as long as Windows 7 still gets updates. This article just confirms my bias, and I freely admit I _am_ biased. I do not like Windows very much to begin with, but as far as Windows goes, I think Windows 7 ____ing nailed it (for people without touchscreens, anyway).

On a related note, I have noticed that Outlook 2013 exhibits a notable lag between a keystroke and a character appearing in the message window. I have not done any measurements, but my best guess is that it is in the order of hundreds of milliseconds. If you type fast (I like to think that I do), Outlook can keep up throughput-wise, but this lag is terribly annoying.

<comment><USER37> > On a related note, I have noticed that Outlook 2013 exhibits a notable lag > between a keystroke and a character appearing in the message window.

Try switching to text-only mails, no zoom... and if you must write HTML mails, do not have an image that is larger size than the window. As soon as there is an image that doesn't fit into the window at 100% zoom Outlook begins to crawl.

<comment><USER36> _My_ work computer is stuck with Office 2007, because I have Office 2007 Professional, and I need Access about once per year for an arcane reason. Office Pro is fairly expensive, so for the time being, I am stuck with 2007. I am still not entirely sure if I should be happy or sad about it. ;-) But I have used Outlook 2013 on coworkers' computers every now and then, and it was pretty laggy.

These days, I do a lot more programming than sysadmin'ning and help desk, but when I was the IT support guy at our company, my overall impression of Office 2013 was not very good. I have seen it just stop working on a handful of computers (out of about 75-80, so to that is a lot), in such a way that I could only "fix" it by uninstalling and reinstalling Office from scratch. On one of our CAD workstations, Outlook and Autodesk Inventor started a feud where an update to MS Office caused Inventor to crash, and the subsequent reinstallation of Inventor caused Outlook to crash when we tried to write an email. (Then we reinstalled Office, and then suddenly things worked magically, so I remain clueless as to what happened.) The latter may be Autodesk's fault as much as Microsoft's (I get the vague impression that they care even less about their software crashing than Microsoft, as long as the license is paid for). But the impression I get is that MS Office has suffered quite a bit over the years. Therefore I am not entirely unhappy about being stuck on Office 2007. I do miss OneNote, the one program from their Office suite I really like, but I have org-mode, so I can manage. ;-)

EDIT: Sorry for venting, that one has been building up for a long time.

</comment></comment></comment><comment><USER38> I always thought I was the only one noticing this. With Compositing enabled, both with DWM and on GNU/Linux, the whole interaction seems to become "soft" instead of the raw that feels much nicer and snappy. From my experience it also has to do with passing through the stack to the GPU when compositing, running it all from the CPU is what makes it feel snappy.

I've also been researching about removing the triple buffer vsync on W10. It seems it was possible in the first builds by replacing some system files, but that option is gone now with the recent big releases.

As of that, I do not see the real reason why compositing would be needed on W10, as transparency and etc arent important factors.

<comment><USER34> Makes me think of the "smooth scrolling" option that you can find in most web browsers. Never liked that, and first thing i hunt down after a new install.

This because using it feels like scrolling through molasses for whatever reason.

</comment></comment><comment><USER39> > Actually, I don't know why a compositing window manager should enforce > V-Sync anyway? Obviously you get screen tearing without it but the option > should still be there for those who want it.

Every additional option (especially in the realm of video settings) opens the door for additional complexity, implementation error, and user error in unintentionally setting the undesired mode. It's perfectly understandable why window managers would settle on one or the other of two extremely different render-to-screen approaches, especially when general consensus for quite some time now in the graphics space has been that minimizing the potential for tearing is preferable.

</comment><comment> half-kh-hacker > your keyboard is already slower than you might expect.

An extract from the linked article:[0]

> A major source of latency is key travel time. It's not a coincidence that > the quickest keyboard measured also has the shortest key travel distance by > a large margin.

They're not measuring from when the signal is sent from the keyboard, they're measuring from when the force begins to apply on the key. If you have a clicky or tactile switch (Cherry MX Blues, Greens, Browns, Clears, etc) then the latency measured here will be _way disproportionate_ to how it actually /feels/.

[0]: [https://danluu.com/keyboard-latency/](https://danluu.com/keyboard- latency/)

</comment><comment><USER40> further reading:

[https://pavelfatin.com/typing-with-pleasure/](https://pavelfatin.com/typing- with-pleasure/)

[https://danluu.com/keyboard-latency/](https://danluu.com/keyboard-latency/)

In Windows 7, classic mode disabled the DWM compositor and V-Sync. It's incredibly dumb that Microsoft would arbitrarily remove that feature in Windows 10 to push their ugly as sin post-metro UI.

</comment><comment><USER41> The DWM compositor is bad for games too. The only way to take it out of the equation is to use your GPU in exclusive mode.

</comment><comment><USER42> According to this: [https://www.youtube.com/watch?v=BTURkjYJ_uk](https://www.youtube.com/watch?v=BTURkjYJ_uk)

Firefox's servo engine can compose CSS elements/Display List together at 500 frames / second.

Maybe next version of Windows / Linux desktop should use FF's servo engine?

<comment><USER43> Your application renders a frame then the compositor gets it and does its transformations, if any. The composited result is then rendered to the screen thus adding one frame of latency. That's why the article says one solution would be to get a 144Hz monitor, it would reduce the time between frames so an extra frame of latency wouldn't be as bad.

You could potentially reduce this delay as well by having the application and the compositor in communication. Since rendering is going to be synced to vblank if you can get the application to not try to sync as well and instead just notify the compositor when it is done drawing a frame you could potentially get the application drawing and the compositor drawing in the same vblank interval. This is what Wayland and DRI3 Present let you do in the Linux world, I assume Windows has something similar but you'd need to opt-in to it so I bet nothing uses it.

</comment></comment><comment><USER44> i've been using sway[0] as my wm for some time now (it's a sort of port of i3 to wayland) and it's incredible that you can actually tell that it is much faster than wms running on X.

[0] [http://swaywm.org/](http://swaywm.org/)

<comment><USER45> It's funny you mention this - it's only in the past few days that we've been taking this sort of thing more seriously, and our work is unreleased!

</comment></comment><comment><USER46> The irony is that it's most often not the fault of the DWM for the latency but the applications themself. Since DWM acts as the screens double buffer, your application needs to be synchronous with the DWM frame timing, not being in sync means latency and flickering.

</comment><comment><USER47> No left margin on webpages is real too, and it annoys me

<comment><USER48> Are you on mobile? It centres perfectly fine for me on desktop. The linked CSS file uses this method:

        body {
        	max-width: 844px;
        	margin-left: auto;
        	margin-right: auto;
        	font-family: Verdana, Arial, Helvetica, sans-serif;
        }

I guess wrapping the whole article with a div with 0.5em margin would fix it on mobile.

<comment><USER47> Ah they are using margin:auto to center. I thought it must be an override since most user agents include a default body margin.

Yes I'm on mobile. My OnePlus 5 hides the first one or two pixels under the bezel if looking at it straight on, so the first character on each line gets a little cutoff. Not sure if this is just my model or if other phones do this also.

<comment><USER48> Either way the conclusion is the same: websites should have a minimum margin! I'm sure the author of the website is receptive to this feedback, so I sent an email.

Also, Firefox (and Safari on iOS) should have "view text-optimised version" button in the URL, maybe that would help you here? I don't know if other browsers have it though.

</comment></comment></comment></comment><comment><USER49> Is there a website that demonstrates the effects of latency after pressing a key? I know there's examples of different frame rates shown with moving circles, but I don't think that's quite the same.

I mean is there really a noticeable difference between say 20 and 40 ms?

</comment><comment><USER50> sorry, so they had to write some code to test what they couldn't perceive but believe they can perceive? I feel like its plausible that this is partly a psychological problem?

<comment><USER51> Well, it does say

> At least I can feel the difference when typing.

<comment><USER50> I can feel people's auras. Discuss.

<comment><USER51> I suspect you know what 'feel' and 'perceive' mean, and just being quarrelsome.

<comment><USER50> I'm suggesting its in their head and they can't actually feel or perceive it.

</comment></comment></comment></comment></comment><comment><USER52> Why would enforcing vsync add more than 1/60s of latency to anything?

This looks way more like badly designed animations than some fundamental problem coming from the hardware.

<comment><USER53> Perhaps it ends up being multiple vsync waits for a given rendered frame? Something like the application or OpenGL driver waiting for vsync before rendering into its buffer, then the compositor waiting for the next vsync before actually compositing/flipping.

<comment><USER31> This is a common source of delay in composited apps/games, yes. Ideally what you want is to have a completed frame ready for the compositor at least a few milliseconds before the next vertical sync arrives, but it's easy to screw that up, especially if you're getting fancy. Triple Buffering also enters the picture here (though mostly for games), because in the bad old days you had exactly two backbuffers, and if both were in use (one being scanned out to the monitor, the other your most recent completed frame) everything had to grind to a halt and wait before rendering or game code could continue. Triple buffering solved this by adding an extra frame, at the cost of an entire frame worth of display latency in exchange for your code spending less time spinning and waiting on the GPU. If someone is careless they could definitely end up with triple buffering enabled for their app (like if they're rendering using a media-oriented framework that turns it on.)

The 'Fast Sync' option NVIDIA added to their drivers in the last year or two is a fix for the triple buffering problem - you get spare buffers, but instead of adding a frame of latency the GPU always grabs the most recently completed frame for scanout. Of course, if a compositor is involved you now need the compositor to do this, and then for the compositor to utilize this feature when presenting a composited desktop to the GPU. I don't think any modern compositor does this at present.

</comment></comment></comment><comment><USER54> Smartphones suffer from input latency too, though I'm unsure of the underlying cause (curious how iOS handles window/view drawing). It only seems to be getting worse, though I haven't done tests on this. While each new model undoubtedly has better tech specs, the interface responsiveness doesn't seem to improve.

<comment><USER16> Ghetto latency test: finger-scroll alternatingly up and down very quickly, see at which frequency your finger and scroll position are 180° out of phase, i.e. you finger is up while the contents are down or vice versa. Smartphones seem to be fine according to that test. Android is very good and iOS is even better.

<comment><USER54> Hm I get about 4 up and downs per second before the scroll position is 180deg out of phase in Safari on iPhone 7+. That translates to about 125 (1000/8) ms latency?

<comment><USER16> Yes, that is how it works :) That value seems surprisingly bad. My limited experience with iDevices (don't own one) has been that the position of the stationary finger on the page vs. finger on the page while scrolling (another way to measure - unless it is specifically fudged with some kind of prediction to make scrolling feel less detached) is very small. But I can't argue with data. FWIW, I like to test Android in the scroll view of the OS settings app or the address book. Those are well implemented and presumably don't add unnecessary lag.

</comment></comment></comment></comment><comment><USER55> "The big problem with latency is that it accumulates. Once some component introduces delay somewhere in the input chain you aren't going to get it back. That's why it's really important to eliminate latency where you can." \- a lesson that applies to many things besides the narrow case of Windows 10.

</comment><comment><USER56> > Don't you find it a bit funny that Windows 95 is actually snappier than > Windows 10?

Comparing them on the same hardware?

<comment> amiga-workbench Try popping the start menu open on a Windows 10 machine with a mechanical hard drive.

<comment><USER57> It wasn't much better on Windows 95 on average hardware around the time of the release of Windows 95. Heck, if you dared click [Start] as soon as the desktop displayed (read: Windows hadn't yet finished booting) then the whole OS would hang for several minutes.

<comment><USER58> Windows 95 had a ton of "clever" tricks, like "OLE Chicken" aka shimming in fake OLE instead of loading real thing just to display desktop faster, executing anything triggered .dll load anyway, but official metric was blue desktop....

[https://blogs.msdn.microsoft.com/oldnewthing/20040705-00/?p=...](https://blogs.msdn.microsoft.com/oldnewthing/20040705-00/?p=38573)

</comment></comment></comment></comment><comment><USER59> If you want to have the most minimal Windows setup:

\- Don't use an antivirus

\- Stop unused services running in the background (e.g: services.msc)

\- Turn off all vision effects including compositing and animation

Then you might want to set up a firewall to block all the nonsense like SMB, NetBIOS, etc. You can also set up a cheap old machine to act as your firewall, reverse proxy cache, antivirus/antispam, etc.

You can set up a script to turn on all the printing related services when you are actually going to use a printer.

<comment><USER60> Pick up an LTSB release and remove the desktop (custom shell).

It looks a lot like Arch / Debian with first class hardware support.

<comment><USER59> While LTSB looks good (fewer bundled apps, that's great), it is very dissimilar from Arch or Debian.

Regarding hardware compatibility, please be aware of the fact that Debian supports many more processor architectures than Windows.

Maybe Windows will support some peripherals better, but Linux has improved a lot in this respect. Chances are out of the box support for hardware is better in Linux than it is on Windows these days.

</comment></comment></comment><comment><USER61> Is it really fair to compare something like Gvim to Slack though? I'm assuming Gvim is going to be magnitudes faster than an Electron app.

</comment><comment><USER62> I wonder if any compositing window managers support FreeSync. That could help significantly, for any v-sync related latency.

Vulkan rendering would help as well.

<comment><USER18> FreeSync only helps when you're running a GPU heavy game that can't keep up with the monitor's refresh rate (dips below 60/120/144/whatever Hz). All desktop compositors definitely can and do render at your monitor's refresh rate :)

Vulkan wouldn't help much. It has less overhead (no validation in production, etc.), but GL/GLES are _plenty_ fast for any compositing tasks. The difference might be completely negligible.

</comment></comment><comment><USER37> Well that certainly explains why a W7 with Classic theme feels faster than with the default Aero theme. Thanks to OP for digging!

</comment><comment><USER63> Is this something related to the latest Windows 10 updates or it was always the case? I mentioned this because, may be unrelated, there are some slow drawings in the UI after the October major update. I can notice this when I login and the desktop is drawn.

<comment> yoz-y The article mainly explores the difference with DWM (Desktop Window Manager) enabled and disabled. DWM's main role is to render all of the windows into separate buffers in memory and then "compose" them on the fly. This for example avoids the effect that dragging a window over a frozen application would result in glitches.

Since Windows 8 DWM can not be disabled. By default in W7 it is also enabled (the infamous Aero), but at least you can get rid of it.

</comment></comment><comment><USER64> WOW! I usually run about 7 emulators of android in one monitor, and my web browser and other stuff in the other monitor. things get really laggy sometimes, turning off this feature made HUGE difference. my experience has improved dramatically

</comment><comment><USER65> the argument about vsync and framebuffers seems mistaken. vsync only prevents partial renderers, not full renders, so disabling it does not remove latency in most cases,

this article makes it sound like there is some magical way to draw directly into the buffer without it being redrawn, which is not true. the best you can get is a chance of faster drawing because you can write into the buffer is its being drawn... (and probably get some tearing)

the idea that compositing is somehow slower is also very misleading... how exactly is a stacked renderer faster?

i think the author is blaming a poor implementation on technical details that they only partly understand.

<comment><USER14> > vsync only prevents partial renderers, not full renders, so disabling it > does not remove latency in most cases,

V-Sync will, as the name implies, wait until the partial draw finishes. This "wait" is what is adding the latency.

> the idea that compositing is somehow slower is also very misleading... how > exactly is a stacked renderer faster?

Yes, compositing is slower because when an application wants to draw its window needs to send the image to the compositor (or acquire the handle to the backing texture for the window that the compositor uses or whatever, that is implementation details) and then the compositor will at some point later draw it together will all the other windows (almost all compositors are V-Synced, meaning that you will see at most 60Hz updates - or whatever refresh rate your monitor is running at). This adds a very noticeable delay between the program needing to update itself and the update being visible to the user.

On the other hand, without a compositor and assuming a window system based on clipping regions (like X11 and Windows without DWM) with direct to frontbuffer drawing, the application will ask the window system to prepare for drawing in the window (which usually means the window system will setup the clipping to be inside the window's visible area), then perform the drawing directly on the framebuffer and notify the window system that it is done (so that the clipping stuff can go away). Notice how nothing here waits on anything else, like v-sync (or any other interval) and how this totally ignores other windows - each window draws itself immediately when needed instead of having to orchestrate an update for all windows on the screen.

Of course with the latter approach you do get tearing since you can have windows drawing themselves during a monitor refresh, but if that is a problem or not is up to the user. Personally i never care about tearing to the point that i barely notice it, yet i immediately notice any sort of V-Sync or compositor induced lag so i always try to avoid these.

</comment></comment><comment><USER66> I also noticed that there's a lot more compositing latency on MacOS

<comment><USER67> How did you measure this? That's contrary to what I've seen using [https://itunes.apple.com/us/app/is-it- snappy/id1219667593](https://itunes.apple.com/us/app/is-it- snappy/id1219667593).

</comment></comment><comment><USER68> The compositor adds some latency, yes.

It also removes latency for everything else. We no longer need to suffer when apps are slow to redraw their content whenever we move windows around.

</comment><comment><USER69> Does anybody know if DirectX and/or OpenGL also suffer from the latency? For example, would a Windows XP VM in Windows 10 have the one-frame lag?

</comment><comment><USER70> Gnome 3 is the worst at this, especially in wayland. Moving your mouse while the compositor is busy causes input to be lost as well

</comment><comment><USER71> "use an operating system that has a stacking window manager"

Exactly, one more reason gnu+linux is the superior os.

</comment><comment><USER72> As the author mentions, i3wm ftw. Seriously check it out.

</comment><comment><USER73> i3wm is indeed amazing.

Good article. Just turned the dwm off at the win7 machine at work, and it's like a free hardware upgrade! Everything is more responsive.

<comment><USER58> placebo, and as a bonus enjoy tearing videos.

</comment></comment><comment><USER74> 100hz UWQHD monitor for work, worked for me

</comment><comment><USER75> I am so glad I don't notice this.

</comment><comment><USER76> The data speaks for itself but I'm trying to perceive any latency in my Firefox (win10) and unable to. Typing seems instantaneous to me. I hate the milliseconds the start menu takes to animate though. Win7 start was instant.

<comment><USER77> What I hate even more is when I press the Windows key and start typing an application's name into the Start menu textbox, and it misses the first two or three keypresses.

<comment> ben-schaaf As a comparison point, gnome 3 does the right thing and buffers the input until it can handle it. On an old machine I usually have the full name typed out and enter pressed before any animation actually starts being displayed.

<comment><USER78> How about they disable animation when windows are activated by keyboard? Or just disable it entirely ;-)

</comment></comment></comment></comment><comment><USER79> Are there any such tests using i3/X11 vs sway/wayland? I'm curious about Linux input latency now.

</comment><comment><USER80> The solution is simple - triple buffering

<comment><USER81> afaik dwm does use triple buffering</comment></comment>


Show HN: escape from meetings, etc with a prearranged phone call: GetOutCall.com - <AUTHOR> http://www.getoutcall.com/

<comment><AUTHOR> This was my recent 'weekend project'. I have so may half-finished apps & sites, that I really needed to break the seal, and ship something. This was the simplest thing I could make, so here it is; it's definitely a relief to have something else 'in the wild'.

It's very simple: a flat HTML page for the front end; the back-end is Python on Google App Engine, using Twilio for the text messages and phone calls.

I'm more than open to feedback!

<comment><USER2> Excellent work. Congratulations on shipping. If I could find a good Twilio alternative for other countries I might do something similar for another another country.

<comment><AUTHOR> Which country are you looking for?

They have their international beta program: [http://www.twilio.com/blog/2012/08/twilio-launches-beta- phon...](http://www.twilio.com/blog/2012/08/twilio-launches-beta-phone- numbers-in-five-new-countries.html) <http://www.twilio.com/international>

and this page seems to include a LOT of countries: <http://www.twilio.com/voice/pricing>

<comment><USER2> Was looking for Australia in particular. I was just searching for it and from the search results I thought they are not providing for Australia just yet but clicked on the link you gave me and seems like they actually do.

</comment></comment></comment></comment><comment><USER3> Sweet.

Now you just need to grab a few more more domains, e.g. "EscapeMyDate.com", etc.

</comment><comment><USER4> Alternate app: be an adult.

<comment><AUTHOR> Is there an API for that?

I tried 'from adulthood import maturity' but keep getting the same error.

<comment><USER4> Yeah, but it's undocumented.

</comment></comment></comment><comment><USER5> I did the same thing with a text message instead of a call a few years back: <http://datebreaker.heroku.com/>

It's almost ridiculous how easy twilio (and heroku) make setting up a project like this.

Edit: That said, I really like your design, and a call is probably a stronger social cue than a text message.

</comment><comment><USER6> I guess I'm old school, but I've always been a bit taken back these days at how some people think it's okay to take phone calls during a meeting.

If you're being paid by your employer to attend meetings, what phone call could possibly be so important that you can't let it go to voicemail and you get to it after the meeting?

But I'm probably at least 10+ years older than the average person on HN, so maybe that's why. I still remember a time when people who took out a cell phone at a restaurant was considered rude and obnoxious, so I guess times do change.

<comment><USER7>
      If you're being paid by your employer to attend meetings,
      what phone call could possibly be so important that you
      can't let it go to voicemail and you get to it after the
      meeting?

Do you remember a few months ago when Amazon's EC2 had problems and took down Quora, Pintrest, Heroku and that lot? [1] Or when Knight Capital managed to lose $440 million in 45 minutes due to a software glitch? [2]

What meeting could possibly be so important that you can't postpone it to deal with a critical production issue?

[1] [http://www.forbes.com/sites/anthonykosner/2012/07/01/survey-...](http://www.forbes.com/sites/anthonykosner/2012/07/01/survey- of-effects-of-cloud-outage-shows-how-much-of-the-web-runs-on-amazon/) [2] [http://www.guardian.co.uk/business/nils-pratley-on- finance/2...](http://www.guardian.co.uk/business/nils-pratley-on- finance/2012/aug/06/knight-capital-computer-glitch-trading)

<comment><USER6> Sure, there are some people that are important enough to warrant interrupting a meeting, but the vast majority of the people that I've seen that get up to leave a meeting to answer the phone don't fit in that category.

<comment><USER8> More likely, the problem is that people are dragged into unimportant meetings they don't need to attend.

</comment></comment></comment></comment><comment><USER9> I love the idea in concept, but I hope people wouldn't actually use it. I'm not sure which I find worse: not being honest with your coworkers or having them judge you for not silencing your phone before a meeting.

</comment><comment><USER10> Simpler: you set your alarm tone to sound like your incoming call tone, then just set an alarm.

Even simpler: take your phone out your pocket and pretend you have a call and it was on vibrate.

<comment><USER8> The call helps you perform the deception, though, by getting you "into character" for a phone call.

</comment></comment><comment><USER11> your background image is 1.4 mb. this one is 100 kb, no noticeable pixelation or artifacts: <http://i.imgur.com/7bcsJ.jpg>

<comment><AUTHOR> Fixed; thanks.

PS: you wanna be my CTO? I think this things going to blow up. Obviously you'll have to work from my garage with no pay for a few years, but you'll get a huge payout when we exit.

</comment></comment><comment><USER12> You can do it with an API call too: <http://www.fakecall.net/>

</comment><comment><USER13> This is also very easy to setup via a ifttt.com recipe. That is how I have done it in the past.

</comment><comment><USER14> Another idea: "helpIamInAMeeting.com" (or something, didn't check domain) where you can post a cry for help from within a meeting and other employers can hire you away on the spot by calling you.

</comment><comment><USER15> How're you affording this?

<comment><AUTHOR> Also: there's a great business model here....

I sell advertising space in the outbound phone calls to someone like a dating site. "Hi, here's your excuse to leave if you want. But next time, use SomeOtherDatingSite.com to find a better match!"

See, it's a foolproof plan.

</comment></comment><comment><USER16> Excellent site! Very clean looking and I'm sure it will prove useful, even though there are other methods of doing this. I love that you let us text just "1h20m" and the like. I will be showing this to many of my friends.

</comment><comment><USER17> nitpick: Background repeats in y, so footer background is the top (hair) when window is long, which doesn't flow and makes the footer unreadable.

<comment><AUTHOR> Thanks, I'll fix it.

I'm not a developer; I knew there'd be mistakes creeping in all over.

(Out of interest: what's your screen resolution? The image is 1180px tall.)

<comment><USER17> 2560x1440

<comment><USER18> _deletes trolling comment here_

</comment></comment></comment></comment><comment><USER19> Good execution, I like it.

<comment><AUTHOR> Thanks! There were other ways of achieving this, but I went for a solution that didn't require installing apps, learning APIs, creating accounts, etc.

</comment></comment><comment><USER20> Great work! I'm inspired.</comment>


Ask the Pilot Blacklisted from AdSense - <AUTHOR> https://www.askthepilot.com/notice-to-readers-google-issues/ <comment><USER2> This is a pattern with Google and they continue to get away with it. Just plain horrible</comment>


Ask HN: Will you retire after 1000 weeks (~19 years)? Or work another 1000 week? - <AUTHOR> I found that most Engineers can't think in weeks, and they shocked to learn that after 1000 weeks (~19 years) they will be almost 20 years older, and they might not live another 1000 weeks after or be able to perform well after the next 1000 weeks.
It's ok to contribute 10 weeks for another framework or pet project, right? However math tell if you do it 100 times 100% focused on one by one thing, you might run out of time and wont be able to cash out on your expectation.
How do you personally feel about the next 1000 weeks?
Any decent timeline lifehacks? <comment><USER2> If you are in a position that you feel your time is being wasted on work or projects, the question is not whether you want to do it for another 1000 weeks - it is whether you want to do it at all.

You could get hit by a bus any day. You have to find a balance in your life where you are happy having lived it, even if it ends tomorrow, while also doing what you need to do to provide for yourself and your family, and enjoy life if you live to 100+ years old.

</comment><comment><USER3> I'm well into the second 1000 weeks (22 years of programming). I don't think there are any decent timeline hacks - just do something, see if it works, and if not, roughly after 6 months I suggest you stop, and take a 6-12 months break. Then, try something else.

I've tried and failed quite a few times (10+), and my current experiment - while I think it's a successful one, time will tell.

One thing I would suggest is you read "The Mom Test" book -- I think it'll serve you well in the long run (it's about marketing, and you'll need to do that if you develop your own products).

</comment><comment><USER4> In 1000 weeks, you can raise your offspring. That's obviously a long time if you remember about your youth.

There are many efforts to bring life long work into a compact number. [https://80000hours.org/](https://80000hours.org/) is quite a famous one.</comment>


Zoom Fatigue and the New Ways to Party - <AUTHOR> https://www.newyorker.com/culture/culture-desk/zoom-fatigue-and-the-new-ways-to-party <comment><USER2> [https://outline.com/Yg3FzT](https://outline.com/Yg3FzT)</comment>


Apple may have finally gotten too big for its unusual corporate structure - <AUTHOR> http://www.vox.com/new-money/2016/11/27/13706776/apple-functional-divisional <comment><USER2> I'm not defending Apple's shitbox of a new Macbook Pro and the fact that the latest iPhone can't even be plugged into a computer the company released a just few weeks later is a bad sign.

But Macs are a tiny fraction of Apple. The Pro products within Mac are an even smaller percentage of that. And actual Professional users of these Pro products are an even smaller percentage of that. A tiny fraction.

If Apple is committed to being this single compatible secure platform (which obviously they are not doing a great job at right now) then devoting more resources to regular updates of their Pro line to include the latest hardware is just not going to happen when you compare the risks to the upside. That's not how their internal product cycles work. A corporate restructuring can't really help with this, it might even add to the risk.

Sucks for us few pro users. If this is such a pain point then start new hardware company, there's a market for it. Or is there?</comment>


Albuquerque program hires panhandlers to work in maintenance jobs - <AUTHOR> https://www.washingtonpost.com/news/inspired-life/wp/2016/08/11/this-republican-mayor-has-an-incredibly-simple-idea-to-help-the-homeless-and-it-seems-to-be-working/ <comment><USER2> It's an old concept sometimes called workfare. It can work until a government gets short sighted and cuts their budget by replacing employees/contractors with unemployed labor (let's use the homeless to mow the lawn at city hall!). At that point it's using an unemployed person to create another unemployed person.

<comment><USER3> That is not how economics work. The money saved from employing low cost labor is spent elsewhere which creates other jobs.

<comment><USER4> That's in theory but in practice this doesn't how it always works.

Especially when you are replacing already cheap "unskilled" or manual labor with even cheaper labor.

In the long run markets will adjust but the long run in this case can be longer than the life of a single worker.

Depending on how much labor you introduce you get get into a pretty never ending cycle of rotating your employment force.

And one can make an argument that displacing day labor with homeless people can have a bigger negative affect since employed day labor is more likely to have financial obligations and dependants than a homeless person.

This is why it's very important to carefully manage these programs and ensure they are at best self sufficient with some public funding but never profitable.

You want them to maw the lawns where lawns would not have been mawend before not to take over existing works.

</comment></comment></comment><comment><USER5> Oy. "The homeless" are not a separate race, religion, creed, etc. _If you get housing, you stop being homeless._ Programs aimed at "helping the homeless" tend to be inherently deeply fucked up.

We need more affordable housing generally and other solutions aimed at helping _human beings with personal challenges._ Those are the folks who end up homeless. Designing programs to help the homeless actually incentivizes being homeless and becomes another barrier to getting off the street because you need to remain homeless to qualify, and that is all kinds of fucked up.

Source: Had a class on homelessness, been homeless for 4.5 years, and I run the San Diego Homeless Survival Guide (a blog).

</comment><comment><USER6> I wish every city gave money to people to returned bottles to a bottle depot. For those not familiar: Buyers of recyclables pay a recycling deposit up front and any one who returns the recyclables will get the deposit back.

It would also be fascinating to provide transportation for the homeless to the nearest garbage dumps. Pay them for sorting out any recyclables. Allow them to take anything which might be of use to them.

<comment><USER7> You must not live in Berkeley. Thanks to a recycling center placed in town, "independent recyclers" roam the streets, collect all the recycling from people's bins on trash days, and it's a terrible situation for both the collectors and other residents.

While collecting the recycling, the collectors steal (from my family multiple times), root through unlocked cars, knife open garbage bags, trespass, wake up sleeping people, and act aggressively towards anyone who interferes.

The collectors themselves live outside of the system of taxes and services, have no safety equipment to to protect them from broken glass etc, and end up in a constant cycle of unemployment, drug dependence, and other ills.

I feel like Berkeley manufactured this "picker" existence - it's an externality of trying to be the most progressive recycling town, and it's no good for anyone involved.

<comment><USER8> Exactly right. People _steal_ recyclables in my area, too, and many Progressives seem fine with theft and the unreported income that results. We have many other criminal acts (which have been caught on camera) associated with this, including rummaging through cars and package theft.

When "three strikes" was foolishly overturned by pro-crime Californians, the amount that you have to steal to be charged with a felony also increased. So people can steal items from cars and doorsteps, in addition to recyclables, and never have to worry about spending a day in prison.

<comment><USER9> Are you actually being defensive about your garbage being your property?

<comment><USER8> No. I am concerned about the city's property being stolen.

The recyclables belong to the city once I leave it out for recycling. They collect the value from it, including any deposit value.

As a Taxpayer, I want this value to go to the city.

<comment><USER9> Ah what a bummer. A well articulated argument followed up by lame ad hominem.

Have a good night!

</comment></comment></comment></comment></comment></comment><comment><USER10> I wouldn't mind seeing a $500-2000 per-employee annual tax credit for businesses that employ the homeless. The types of jobs that are around minimum wage seem like they'd mostly be low-margin businesses, so this would be a pretty big incentive. And it seems cheaper than expanding shelters and similar programs(though you'll still need some shelters).

Maybe it would be better to assess the tax on non-homeless needed for this credit at the county level, since cost-of-living and homelessness are both local issues. Maybe it would work better as a property tax than an income tax, for similar reasons.

<comment><USER11> How would you ensure that the company is actually hiring homeless employees? What exactly is homelessness? Where is the line? Who does background checks? What are the penalties for lying about being homeless to get the tax credit?

<comment><USER10> There's already precedent in federal law, so I assume the states can just copy that.

[https://www.law.cornell.edu/uscode/text/42/11302](https://www.law.cornell.edu/uscode/text/42/11302)

There's also precedent in prioritizing auditing resources on offenders with large payoff, having the computer watch for suspicious tax forms, pricing penalties to include the people who get away with it, and whatever else they do to enforce the existing 2600 pages of federal tax law plus whatever state tax law.

</comment></comment></comment><comment><USER12> This doesn't seem like a very scalable plan nor will it help with the chronically homeless. NYC does something similar with giving park clean-up jobs to recently released convicts or other homeless people. It's better than a simple handout, but doesn't address underlying problems.

[http://www.doe.org/rwa.cfm](http://www.doe.org/rwa.cfm)

<comment><USER13> There are multiple underlying problems: overpopulation, people not being right for jobs, jobs not being right for people, education requirements, failed federal programs, etc. It's very sad.

<comment><USER14> Mental illness and substance-abuse as well. So much of homelessness in America is a result of deinstitutionalization decades ago with no credible alternative put in place.

<comment><USER12> Exactly this. This program will probably help a lot of people down on their luck. Those kind of people utilize shelters and will generally do whatever they have to to get off the streets. The classic panhandling hobo however, is mostly incorrigible and nigh impossible to get on the right path. It takes a huge amount of intervention to get a chronic subtance abuser or schizophrenic to live independently.

<comment><USER15>
        > The classic panhandling hobo
        > however, is mostly
        > incorrigible and nigh
        > impossible to get on the
        > right path

Citation? *

* That doesn't fall prey to the No True Scotsman fallacy

<comment><USER12> I don't see how that fallacy can apply. We have pretty good definitions for chronically homeless. Here's a good summary, and there's a linked PDF with more data. Exhibit 2.7 in the PDF says that among the single homeless population (not families) 68% are substance abusers and 48% are mentally ill.

[http://www.pbs.org/now/shows/526/homeless- facts.html](http://www.pbs.org/now/shows/526/homeless-facts.html)

</comment></comment></comment></comment></comment></comment><comment><USER16> Since the headline doesn't tell you: the city has started to hire penhandlers for simple day jobs.

<comment><USER17> Thank you. Hopefully Facebook's changes will put a dent in these click bait headlines

</comment></comment><comment><USER18> Really can't stand these type of headlines, really looking forward to when the trend dies off.

<comment><USER19> A B testing will keep showing them better, so I suspect it will continue. Unless you give up all privacy, then the producer can see YOU don't respond well to click bait and fix your titles...

<comment><USER15> A/B testing will show them getting good results until people get tired of them, and stop clicking them.</comment></comment></comment>


Show HN: Emacs Anywhere - <AUTHOR> https://github.com/zachcurry/emacs-anywhere <comment><USER2> The editor war isn't over yet :D

[https://github.com/zachcurry/emacs- anywhere](https://github.com/zachcurry/emacs-anywhere) (here)

vs.

[https://github.com/cknadler/vim-anywhere](https://github.com/cknadler/vim- anywhere) \+ [https://news.ycombinator.com/item?id=16395379](https://news.ycombinator.com/item?id=16395379)

Nice to see them both still in use :-)

<comment><AUTHOR> You've got that right! I built this as a knee-jerk reaction to vim-anywhere. XD

<comment><USER3> How is this different from "it's all text"?

<comment><USER4> For one it seems to be system-wide rather than Firefox-specific (too bad It's All text doesn't work after Quantum). Apparently relies on the clipboard instead of filesystem

</comment></comment></comment></comment><comment><USER5> You can do this in Bash already (Ctrl x Ctrl e is bound to readline's edit- and-execute-command, which will open $EDITOR with the current command), but being able to do this everywhere is nice!

<comment><USER6> Thank you! I tried to google how to do this some time ago with no success!

However it looks like it only works with emacs editing mode (set -o emacs). Is there a way to do this in vim editing mode (set -o vi)?

Also it doesn't appear to work in zsh. Is there a zsh equivalent?

<comment><USER7> For Zsh, add "bindkey '^x^e' edit-command-line" somewhere in your ~/.zshrc and you have it.

</comment></comment></comment><comment><USER8> Nice! I spent in inordinate amount of time recreating emacs key bindings in MacOS using Karabiner -- everything from editing text to scrolling to switching windows -- before the latest release of MacOS broke it. I found a replacement but it's not as good.

<comment><USER9> Please share the Karabiner replacement you are using

<comment><USER10> This is the Karabiner alternative for >10.12: [https://github.com/tekezo/Karabiner- Elements](https://github.com/tekezo/Karabiner-Elements)

</comment></comment></comment><comment><USER11> Awesome. I have one suggestion though: the project description could be easier to understand.

I wouldn't understand anything without the screenshot altho I use Emacs for 11 years. Imagine beginners reading it...

<comment><AUTHOR> What should it read? I'm open to any suggestions.

<comment><USER12> I found the description pretty good, but maybe an extra 'headline' might be helpful:

What it does: Use emacs to input text in any program at any time

How it work: A keyboard shortcut of your choosing...

<comment><AUTHOR> I like it!

</comment></comment></comment></comment><comment><USER13> Sounds similar to Edit with Emacs

[https://chrome.google.com/webstore/detail/edit-with- emacs/lj...](https://chrome.google.com/webstore/detail/edit-with- emacs/ljobjlafonikaiipfkggjbhkghgicgoh?hl=en)

</comment><comment><USER14> It would be nice if there's a plugin that launches vim/emacs with a tmp file in the background, and replaces the textarea with a terminal like canvas that connects to it. Upon exit, the content gets copied into the textarea.

</comment><comment><USER15> This is amazing, I have always wanted something like this. Given that it requires xdotool, I was wondering if it would work in a Wayland system (I don't use Wayland yet, I'm just curious) ?

<comment><AUTHOR> Good eye! I don't think it does on account of xdotool. If you can suggest something better than xdotool I'm open to using it. I only use two commands from xdotool at the moment.

</comment></comment><comment><USER16> Similarly I made an app the other day to allow custom key shortcuts on macOS. The defaults use vim keys but I plan to eventually add key chords too. [https://github.com/sdegutis/Vimac](https://github.com/sdegutis/Vimac)

</comment><comment><USER17> I'm typing this comment in Emacs! This is so exciting!

<comment><USER17> It even works in Facebook! If it can handle the ten layers of browser UI capture there, it can handle anything...

</comment></comment><comment><USER18> Great idea. I will use this.

Minor nit, can you fix the grammar here: "inserted into the application your using"

Should be "you're using" as in "you are using".

Thanks for this.

<comment><AUTHOR> Thanks!

</comment></comment><comment><USER19> Does anyone use emacs with colemak or dvorak.? The default key bindings seem unintuitive with it.

<comment><USER20> I use dvorak and I can agree that there are at least a few popular chords that are inconvenient, like Cx Cf. But I've gotten used to this and haven't changed any core key bindings.

And, of course, the upside is that on any random machine with emacs is 100% compatible.

Oh, and one more tip :-): bind 'vim' to 'emacs -nw -Q' which loads emacs really fast (without requiring the daemon to be running).

</comment></comment><comment><USER21> I've done it recently using Hammerspoon, if anyone interested [https://github.com/agzam/spacehammer](https://github.com/agzam/spacehammer)

</comment><comment><USER22> Could this be done in android too? I use emacs in android through termux and I like it.

<comment><USER23> How did you set that up?

<comment><USER22> Just install termux from android. Then install emacs from terminal. It works flawlessly.

</comment></comment></comment><comment><USER24> I'm getting 'No such file or directory' errors following these instructions.

I use spacemacs but I don't think this should cause any issues. I'm new to both though.

<comment><USER24> Got it. The macOS instructions were updated correctly in the readme I see.

I even wrote this comment in emacs!!

</comment></comment><comment><USER25> I've read the README, Can someone please explain this to me?

It looks like this just opens an editor with a shortcut and pastes the text on exit...

</comment><comment><USER26> Lovely idea. I used to use emacs with Firefox via plugin many years ago and I still miss it. Hope one day you can figure out Windows!

</comment><comment><USER27> only if it was vim... :P

</comment><comment><USER28> jiojojo

</comment><comment><USER29> It's about time it caught up to vi on the 'being available anywhere' front.

</comment><comment><USER30> Vim is better

<comment><USER31> True, that's why Emacs has Vim emulation (evil mode).

<comment><USER32> Exactly, vim is better than emacs, and I've always known this. It wasnt until recently that i found out emacs is a better vim than vim. Spacemacs really is a masterpiece.

<comment><USER33> Indeed it is. Still early and getting better all the time but it's very usable and much less broken than vim as it stands. With the spacemacs package cache and version pinning it will become even better out of the box.

<comment><USER34> NeoVim is the better (best) vim! Fixes a lot of the problems with vim while still staying true to its spirit.

<comment><USER33> Yeah, neovim is a great project but still lacks imo compared to emacs. maybe when the ecosystem and plugins get more stabilized will it be a really compelling option for me to switch. once you get past some of the emacs oddities it's pretty much a better vim. The thing about neovim is that bram added the feature that neovim was initially forked off because of and he made vim's version incompatible with neovim's async. being able to have transient buffers in emacs is a very powerful feature that is used all over the place (magit is one that does this very effectively). I am not sure neovim has all the necessary fundamental building blocks to compete and allow these extremely rich plugins like orgmode, magit, helm, swoop, evil, etc. I could be wrong on that but the plugins on the emacs side are much more robust which leads me to believe that emacs is better at customization. only having lua as a baked in language is limiting just like only having viml as the builtin language for vim was limiting as to what could be done easily... most plugins will simply not use any other language for compatibility and ease of install even though it's possible to use ruby/python/etc. In addition the concepts of major(vim filetypes) and minor modes(editor enhancements) is pretty great too.

don't get me wrong, all that said, I couldn't and wouldn't use emacs if it didn't have a rich vim emulator.

</comment></comment></comment></comment></comment></comment><comment><USER35> Nice idea. But AFAIK it cannot work with most "modern" web sites, because they are increasingly using some Javascript nonsense instead of a textarea. (Disclaimer: have not tried this, but some "everything is text" extension years ago)

<comment><AUTHOR> This tool does not rely upon the application you use it with. You can use it anywhere with any application which allows you to paste text.

<comment><USER35> > You can use it anywhere with any application which allows you to paste text.

Thanks for this clarification. (Even pasting becomes increasingly impossible. For e.g. Google does not allow me anymore to paste my username at login, and my (work) username is very long... I suppose pasting might offer an easier way scripted attacks. But yeah, most applications still allow it.)

<comment><USER36> Where does google prevent that? I tried on the web login page and I can paste without problem. I'm not sure why they'd prevent you from pasting your login in the first place.

In general there's always a simple way to bypass these websites limitations, like those who try to disable the right click.

<comment><USER37> Maybe it's a "security feature" of some AV software or IE/edge. Wouldn't surprise me.

<comment><USER35> I use Firefox on Linux.

<comment><USER37> I didn't mean to insult you :)

Since you talked about your "(work) username" I thought your employer chose your OS/browser for this particular case.

<comment><USER35> I didn't take it as an insult :)

While my employer does not chose my OS/browser I am in the lucky situation that most of us use Linux with their favorite distro.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER38> Reminds me of a hipster riding a Penny-farthing.

<comment><USER39> I'm a Vi user rather than emacs but I can perfectly understand wanting to have the same keyboard interface across platforms.

Could you explain what's bad about that or why you think classic keyboard interfaces are a fad? (I've been using Vi interfaces in one form or another since 1989).

<comment><USER38> In other words, you're not a hipster... just some old dude who likes being offended by shit.</comment></comment></comment>


PHP API Framework - <AUTHOR> https://github.com/evantahler/PHP-DAVE-API

<comment><AUTHOR> DAVE is a minimalist, multi-node, transactional API framework written in PHP

Dave contains an end-to-end API test suite for TDD, a Task model, an Active Database Model, and a stand-alone development server (written in only PHP as well) to get you started.

<comment><USER2> Why lock the platform into 5.3 without making use of 5.3 features (namespaces would clean the structure up a little). Why not use getops for the command line arg processing rather than your own __parseArgs function. The framework seems like a odd mix of procedural and oop paradigms. And considering it's a framework (and transactional), why did you not use PDO for the database access?

I'm asking out of curiosity only because recently I've had a lot of PHP work on.

<comment><AUTHOR> Hi Ray!

Those are exactly the types of comments I was hoping to get form posting here to help flesh this project out.

The main reason I stayed away from PDO is that I was trying to support both relational and non-relational databases (support for Mongo already). I certainly could have used PDO within the mySQL layer, but the next level of abstraction for the DAVE actions was the main goal. I very well may switch over to PDO to make the mySQL implementation into a generic 'relational' driver if I get enough comments/requests about it.

The version jump to 5.3 is new and was necessitated by some of the DaveObjects. I certainly will be using getops() instead. Thanks for the suggestion!

</comment></comment></comment><comment><USER3> Wow, it looks great! Lots of features (CRON even!) and doesn't shackle you with MVC. Might be just the thing to reign-in my free-wheeling PHP style without being too restrictive.

</comment><comment><USER4> There are plenty of those, like this: <https://github.com/Mashaper/mashape- php-library></comment>


The Math I Learned After I Thought Had Already Learned Math - <AUTHOR> http://blog.mrmeyer.com/2015/the-math-i-learned-after-i-thought-had-already-learned-math/ <comment><USER2> The revelation he has had looks trivial to me. Graphs as equations, equivalence of expressions or matrix as linear operators are all something I learned and understood from the very beginning.

I wonder if it has something to do with the textbooks. As a Chinese I often found American textbooks on mathematics so softcore. They have so many analogies, so many "real world" examples that masquerade the true mathematical meaning of the concept. Many of Chinese people argue that these are the reason that Americans are more creative, but I cannot help but wonder maybe the lack of rigor underlies some of problems with American math education.

Or maybe I am just the exception. Maybe other Chinese struggle with math just the same.

<comment><USER3> Americans generally struggle with mathematics, and not just advanced concepts. The problem is cultural, because it is acceptable to be poor at math, it's viewed as wholly unnecessary. Some examples are A&W's Third Pounder vs McDonald's Quarter Pounder (3 < 4 so quarter pounder is bigger) [1], how long does it take to go 80 miles if you're driving 80 miles per hour [2], and Verizon Math [3].

As for Chinese struggling with math, I can give you firsthand experience at my _American_ University, where the foreign (Chinese and Indian) students are known for rampant cheating, in both the Undergraduate and Graduate levels.

We have a serious problem with logic, math, and science. People who are good at the three are ridiculed and alienated rather than celebrated, although it's not a hard rule, just something I've noticed. Reading for pleasure is the exception rather than something normal. We're very anti-intellectual once you get out of the big cities.

[1] [http://www.nytimes.com/2014/07/27/magazine/why-do- americans-...](http://www.nytimes.com/2014/07/27/magazine/why-do-americans- stink-at-math.html?_r=0)

[2] [https://www.youtube.com/watch?v=m2eyq9qTOQY](https://www.youtube.com/watch?v=m2eyq9qTOQY)

[3] [https://www.youtube.com/watch?v=MShv_74FNWU](https://www.youtube.com/watch?v=MShv_74FNWU)

<comment><USER4> The Verizon Math was gold.

</comment></comment></comment><comment><USER5> I think that maths at school it still too focused on creating engineers (the non software kind) and much of the material is aimed at producing people who can do calculus.

I'd prefer for there to be more focus on proofs, logic, geometry, number theory, graph theory, and cryptography etc. I think these concepts would give people a more rounded understanding of mathematics and prevent their experience of mathematics being one of pain.

<comment><USER6> I don't know if there's too much calculus, but there's definitely too much of the wrong type of calculus.

Congratulations, you have just learned to integrate. Let us now spend the next three years running through several thousand different examples of analytic integration of one-dimensional continuous functions.

More dimensions? Path integrals? Numerical integration methods that you'll almost certainly have to apply in the real world because most functions don't have analytic integrals? Differential equations? Never heard of them. Now let's all integrate (x^2 - sin(x))/coth(x).

<comment><USER7> I think there is too much focus on the mechanics and not enough on the big picture behind what you're trying to do. Mostly it's a lot of. Step one recognize the problem. Step two apply the solutionator+ and turn zee crank. Step three receive kibble.

+Solutionator: Bunch of mechanical steps that the student understands in the exact same way a trained monkey understands an organ grinder.

<comment><USER8> It's kind of funny, most people who major specifically in math or applied math will take something equivalent to a course in Real Analysis. RA is basically starting over from scratch and reteaching you the exact same material as calculus, but in a much more formal and rigorous manner. Mostly it focuses on eliminating the not-so-rigorous concept of an infintesimal quantity and formalizing the notion of limits and convergence (albeit, there is a way to rigorously treat infintesimals called nonstandard analysis, but I digress). It involves a lot more open-ended thought than the endless memorization of earlier calculus classes. It's often dreaded by undergraduates as being very proof-heavy, but it was one of my favorites. It always felt like learning the "essence" of calculus, at least for me (who sucks at/dreads rote memorization).

<comment><USER9> My real analysis textbook says on the back:

 _Was plane geometry your favorite math course in high school? Did you like proving theorems? Are you sick of memorizing integrals? If so, real analysis could be your cup of tea. In contrast to calculus and elementary algebra, it involves neither formula manipulation nor applications to other fields of science. None. It is Pure Mathematics, and it is sure to appeal to the budding pure mathematician._

<comment><USER10> Complex analysis is even neater. (But that's almost algebraic in its niceness.)

<comment><USER8> I really enjoyed measure-theoretic probability theory myself.

<comment><USER10> We did that as a precursor before probability theory. Really puts the latter on a sound footing.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> Cool, i also had an "aha" moment while reading:

"It was only after grad school that I learned (from Lockhart's book Mathematician's Lament) to consider natural numbers as stones that can be arranged in various patterns that illustrate the different properties of a number. For example, evens are piles of stones that can be arranged into two equal rows, and square numbers have just the right number of stones to make a square! It's really fun thinking about various operations in this way, and there are some beautiful proofs based on this technique. For example, why the sum of the odd numbers 1 + 3 + 5… Is always a square."

I should hang out with maths teachers more often!

<comment><USER12> This is a really helpful way to think about natural numbers. I like to remind myself that we can gain efficiency through abstraction, but true, intuitive understanding comes through concretization/deconstruction.

Interestingly enough, I use round stones to represent ideas when I meditate. As the ideas come to me, I pick them up, examine them, and weigh them. If the idea is pressing, I delve into it and think it through. If not, I put the stone down and wait until my mind picks up the next.

Mental stones: some of modern life's most useful tools :)

</comment></comment><comment><USER13> Two good ways to represent plane curves are parametric form:

(x(t), y(t))

or implicit form:

f(x, y) = 0

Parametric form is naturally associated with one point of view of what a plane curve is: the set of points traced out as a parameter is swept over its domain. Implicit form is naturally associated with a different point of view: the set of points that satisfy a certain relation.

Functions of the form

y = f(x)

can be easily re-expressed in parametric form:

(t, f(t))

or implicit form

y - f(x) = 0

so both the parametric viewpoint and the implicit viewpoint are equally valid and useful ways of understanding the graph of a function. You could rephrase the author's insight as saying that he had always understood graphs of functions parametrically, but later learned to also understand them implicitly.

Depending on the application, it may be more convenient to have a parametric representation of a curve, or an implicit representation of a curve. For example, it's easy to find a point on a parametric curve, but hard to test if a point is on a parametric curve; on the contrary, it is hard to find a point on an implicit curve, and easy to test if a point is on an implicit curve. If your curve is the graph of a function, it is easy to convert back and forth between these forms, but in general, converting from one form to the other may be quite hard.

For me, the relationship between implicit and parametric representations is a piece of math that I didn't really learn until long after I thought I had already learned math.

</comment><comment><USER14> I somehow understood the same thing(a graph is a collection of points that makes a function true..) a year ago through Gilbert Strang Big picture of derivatives: [https://www.youtube.com/watch?v=T_I- CUOc_bk](https://www.youtube.com/watch?v=T_I-CUOc_bk)

</comment><comment><USER13> It looks like the blog is down at the moment. Here's google's cached version of the post in the meantime:

[http://webcache.googleusercontent.com/search?q=cache:7SWRaHW...](http://webcache.googleusercontent.com/search?q=cache:7SWRaHWxfiEJ:blog.mrmeyer.com/2015/the- math-i-learned-after-i-thought-had-already-learned- math/+&cd=1&hl=en&ct=clnk&gl=us)

</comment><comment><USER15> I really didn't get the article. I mean, I've got that we have some mapping f: R -> R, or equivalently f: (x, y) \in RxR, so we could represent it by drawing on 2d plane, but no further...

Author claimed, that he had been missing something essential regarding that stuff, but I wonder what exactly does he talk about?

<comment><USER16> People think of "drawing a graph of a function" as drawing a line, so if _y=sin(x)_ they end up with a wriggly line going infinitely far left and right.

What they don't think of is that the line is actually the collection of points (x0,y0) such that the equation _y0=sin(x0)_ is true. Kids in high school don't think of the graph of a function as being a subset of points of the plane, being:

      { (x,y) : y=sin(x) is true }

Realising that opens the doors to equivalences between different ways of thinking. We can think of a permutation of objects as both the act of permuting them, and as the result of applying that permutation to the default initial position. We can think of a vector (4,6,9) as a location in space, and as the movement to get from (x,y,z) to (x+4,y+6,z+9). We can think of "3" as a location on the number line, or as the action of adding 3 to something, or as the action of multiplying 3 my something, and so on.

We can think of the graph you draw as a line, or as a subset of the plane, and we shift effortlessly between them, deliberately blurring the distinction, and from that blurring can come power.

Does that help?

<comment><USER17> This hurts when they deal with equations like

x^2 + y^2 = k

and can't even begin to understand how you could _graph_ something like that.

It took me a while to grok it, so I second his experience of this not being well stressed (30 years ago, admittedly). I did further maths A-level (and got an A), but didn't grok it until uni.

<comment><USER18> Having long been fascinated with computer graphics this bit was easy for me to get. I imagined a computer raster-scanning the plane and plotting a point when the condition in the equation was true. I just had to scale it up in my head from screen resolutions to infinite resolution and infinite extent and... oh boy, this is already starting to make my head hurt...

But the _gist_ of it I got. And I admit, I'm unusual.

</comment></comment></comment></comment><comment><USER19> Is "secondary math" university mathematics? How can anyone think he's "learned" that?

<comment><USER20> No, it's high school math. The kind you learn before university. secondary school == high school in many places.</comment></comment>


Blöcks – Build electrical circuits to master challenges in VR - <AUTHOR> https://kosmosschool.itch.io/blocks <comment><AUTHOR> Hi everyone

Today we're releasing the free alpha version of our puzzle game, Blöcks.

You can download it for free on SideQuest and Itch. Looking forward to your feedback!

Here's some more info:

Blöcks is a VR puzzle game made for the Oculus Quest. Build electrical circuits with different Blocks to master increasingly difficult challenges.

Each Challenge has objectives that require you to measure a certain current (Ampere) or voltage (Volts). To successfully complete a challenge, you need to build a circuit with the available Blocks and make sure it has the right current and voltage.

This is an early alpha version, but if you have an Oculus Quest and like puzzle games, let me know what you think!

</comment><comment><USER2> It would be nice to have a non-VR version of this</comment>


3 female devs built a hilarious, awesome guide to periods that you should read - <AUTHOR> http://terriburns.com/the-periodical/

<comment><USER2> this is excellent.

<comment><AUTHOR> I love how hilarious yet informational it is.</comment></comment>


Put Yourself on Internet with Jekyll, GitHub and Cloudflare - <AUTHOR> http://adgllorente.com/2016/09/put-yourself-on-internet-with-jekyll-github-and-cloudflare/ <comment><USER2> You can also use GitLab for the same thing.

Just chiming in to promote this a bit. GitLab is a well-known open source alternative to GitHub, which actually offers more features than GitHub nowadays.

[https://pages.gitlab.io/](https://pages.gitlab.io/)

<comment><USER3> And Gitlab Pages supports https for custom domains, which Github Pages does not yet support.

<comment><USER4> And Gitlab Pages supports free CI for building your static HTML assets however you like, upon code push, without cluttering your repo with compiled assets. Run code through Metalsmith? No problem. Run through Jekyll? Can do. Anything that's Dockerized.

This is perhaps my favorite distinction between Github and Gitlab pages.

<comment><USER5> Glad to hear that! Examples for many static sites generators can be found on [https://gitlab.com/groups/pages](https://gitlab.com/groups/pages)

</comment></comment></comment></comment><comment><USER6> I just moved from this setup to GitLab. GitLab Pages is similar, but much more flexible. For instance, you can use Hugo, Metalsmith, etc, and you can use CI scripts to test before deploymemt. You can also avoid Cloudflare by using Let's Encrypt (or other) certs, and they're working to include smooth Let's Encrypt integration for easy renewals.

Of course, flexibility comes at a cost: GitLab is much more complicated, and the documentation kinda sucks. OTOH, the setup process is a good learning experience.

<comment><USER5> Thanks for using GitLab! Can you maybe elaborate on how we can improve the documentation?

</comment></comment><comment><USER7> Check out Netlify ([https://www.netlify.com](https://www.netlify.com)) for a simpler setup that's also free and lets you use Jekyll plugins, enables very aggressive caching on the CDN level, but with instant cache invalidation and atomic deploys, and brings features like deploy previews (a unique preview URL for any pull request), form processing, redirects, rewrite rules, proxying, etc, etc...

[Disclaimer, I'm one of the founders]

<comment> le-mark Is it appropriate to use this thread to promote your (well established) service, when others get down voted to oblivion for doing the same thing?

Serious question, this post is nothing more than marketing blurb, contributes nothing to the discussion. What's the site policy?

<comment><USER7> As long as I've been reading HackerNews (all the way back since it was called StartupNews), it's been common to see founders chime in about their startups when they are clearly relevant to the topic and it's not done by a marketing drone posting on their behalf, and with a clear disclaimer.

Whether people gets downvoted or upvoted for it depends on whether readers see the comment as legitimate and relevant or as spam...

</comment></comment></comment><comment><USER8> OT: I like Jekyll for blogs, but I'm looking for something simpler to better fit a simple use case.

I want to generate static HTML files, the simplest example being a 5 page website that uses the same header and footer template across all pages. I want static files for simple scaling, not PHP or JS templating. Ideally this tool would be node based for simple automation with gulp. Anything out there that fits the bill? Handelbars.js with precompiler looks like a good fit, but I'm curious what others use in this scenario.

<comment><USER9> I've used Middleman in the past, but I actually just switched to Jekyll for my personal single page website.

I found Jekyll to work very well out of box. All of my content is in a markdown file, with styling broken out to layout HTML and CSS.

IMO, I find the community around Jekyll, along with the understandability of Ruby to outweigh using a simpler solution.

<comment><USER8> Fair enough. My only experience with Ruby was to get Jekyll running so it wasn't as familiar to me, but the community and support is a pretty strong point.

</comment></comment></comment><comment><USER10> Using Jekyll, S3 and Cloudfront is another popular option. I found great themes on [http://jekyllthemes.org/](http://jekyllthemes.org/) . Also, Jekyll has support for seo etc.

</comment><comment><USER11> Say no to CloudFlare, it messes up Tor.

<comment><USER12> You can configure CloudFlare to allow Tor visitors without CAPTCHA:

[https://support.cloudflare.com/hc/en- us/articles/203306930-D...](https://support.cloudflare.com/hc/en- us/articles/203306930-Does-CloudFlare-block-Tor-)

</comment></comment><comment><USER13> Two of the cons listed aren't totally correct: > You don't have a WYSIWYG editor so you have to use Markdown or similar languages to write your posts. You can use a service like siteleaf to add a WYSIWYG backend to jekyll

> You have to deal with a Terminal to push your changes using GIT Github's > desktop application is actually pretty easy to use, much more so than using > git from terminal

<comment><USER14> See also [http://prose.io](http://prose.io), a nice little interface to your Github repos and Jekyll sites.

</comment></comment><comment><USER15> Is there a way to have HTTPS working on your own domain if you host your content on github pages? Last time I looked it wasn't possible.

<comment><USER16> Doesn't look like it

[https://gist.github.com/coolaj86/e07d42f5961c68fc1fc8](https://gist.github.com/coolaj86/e07d42f5961c68fc1fc8) [https://github.com/isaacs/github/issues/156](https://github.com/isaacs/github/issues/156)

<comment><USER15> Oh sweet, looks like GitLab does. Time to migrate.

</comment></comment></comment><comment><USER17> Really, really wish there was a database backend available via CORS for my static github pages hosted site...

Is there such a thing?

<comment><USER18> Firebase is a general backend you can use from JS.

For content, you could look at Prismic.

</comment></comment><comment><USER19> Can someone ELI5 me what the appeal is to something like Jekyll, seems a lot easier to just setup a Posthaven account (or something similar) given you also get a WYSIWYG.

<comment><USER20> From my point of view, you're trading ease of editing but gaining speed, security and scalability. If the only thing on the site is static files behind a CDN, it's going to be fast and hard to hack.

</comment></comment><comment><USER21> Does Github have any rules for what type of content you can share? Can I show off my graphic novels if they feature occasional nudity?

<comment><USER22> They MIGHT remove it.

"We may, but have no obligation to, remove Content and Accounts containing Content that we determine in our sole discretion are unlawful, offensive, threatening, libelous, defamatory, pornographic, obscene or otherwise objectionable or violates any party's intellectual property or these Terms of Service."

[https://help.github.com/articles/github-terms-of- service/](https://help.github.com/articles/github-terms-of-service/)

</comment></comment><comment><USER23> Yeah, this is pretty common thing. I definitely like Jekyll for its simplicity compared to other static site generators.</comment>


Ask HN: Chrome and excessive memory consumption - <AUTHOR>

Anyone else having this issue with Chrome?
I'm using Chrome v25.0.1364.152 on Windows7 with 4 tabs open right now. Task mgr shows 13 processes consuming 2.9gig of memory! WTH is going on with it?
I have to restart the browser every 2 hours just to get any work done. <comment><USER2> No, on Windows right now, I'm using the same version and with 9 tabs open I got 512 mb being used for chrome.

EDIT: When this happens you can see if VMMap can help you.

[http://technet.microsoft.com/en- us/sysinternals/dd535533.asp...](http://technet.microsoft.com/en- us/sysinternals/dd535533.aspx)

<comment><AUTHOR> Thanks for the VMMap tip!

I restarted Chrome when I submitted this and it's already at 2gig and climbing. Ill see what VMMap tells me.</comment></comment>