HNHacker News
TopNewBestAskShowJobs

buybackoff

777 karma · joined September 23, 2014

submissionscomments
buybackoff··on Apache Guacamole
In most cases I use it via my smartphone with dynamic IPv6. A whitelist fir a train trip is impossible.
buybackoff··on Apache Guacamole
I wanted to avoid VPN both for my main working/dev machine and clients. What if VPN does not go up after hard reboot due to some weird loading order while I'm not logged in (e.g. electricity failure)? Both that machine and Guacamole/NGINX host are configured to autostart after powering off. This is the first thing I tested. For clients, I do not want to have VPN on each of them. And what if I need to use a random machine? Multi-layer opaque https endpoint seems safe enough.
buybackoff··on Apache Guacamole
Using it mainly because of the paranoia of just exposing RDP to the internet. Http(s) is very convenient to add more layers of security, in my case via NGINX (both as LXC containers in Proxmox). I'm using a wildcard domain *.myhome.tld pointed to my static IP. Guacamole is hosted at try_guess_me.myhome.tld, with NGINX basic auth same for all subdomains (further protected by fail2ban). So in total 3 tokens are required (subdomain and basic auth username and password) just to get to the Guacamole login page, where additional username/password + 2FA are required. I used to expose RDP directly for years, but after a chat with a colleague before vacations and a purchase of a NUC for a homelab server decided to strengthen the security slightly.

RDP is still much better user experience, so once when I needed a longer session I used Guacamole to access my router admin interface and temporarily expose RDP directly via a random port and a very strong password. I'm still not convinced that the latter combination is not enough, but it's better to be safe than sorry.

buybackoff··on Caddy – Open-source web server with automatic HTTPS
With acme.sh, 80% time is spent on configuring Cloudflare API keys, then the rest 20% it's just editing and running a couple of commands (so both steps are fast). The certificates are installed in any dir, e.g. `etc/nginx/ssl/mysite.com`, and auto renewed, with a custom shell command after, e.g. to restart NGINX.

Tried Caddy before learning acme.sh. Even looked in the source code. Nice idea, but it's a new custom thing. Spent a very small learning time on NGINX, everything is googleable, multiple tutorials, Q&As, samples on every possible subject and usecase. E.g. homelab Guacamole was freezing, the first search result was the fix - not trivial, but just copy-paste several config lines. It's hard to beat the performance and simplicity of NGINX. It does not require to learn all possible tweaks from the start, but learn as you go from 5-lines config SSL reverse proxy and up to whatever complexity is required.

buybackoff··on Ask HN: What metrics do you pay attention to?
I have Instinct Solar. And I had a similar period of constantly low battery. I even thought that it was broken. The solution was two weeks vacation in the Mediterranean, after that 100 in the morning became frequent.
buybackoff··on Ask HN: What metrics do you pay attention to?
Instinct Solar
buybackoff··on Ask HN: What metrics do you pay attention to?
I was on vacation in my home country during the record heatwave this June, friends, drinking... by the metrics it was worse than covid :)
buybackoff··on Ask HN: What metrics do you pay attention to?
A tighter, but still comfortable, fit. Also I changed the hand on which I wear it overnight. It used to show BS sometimes before the change. I think it depends on the bed and sleep posture.

I do not care about sleep phases or when the watches think I fall asleep, it's approximately correct and that's enough. Hours of sleep mean much less than the body battery increase overnight.

buybackoff··on Ask HN: What metrics do you pay attention to?
Garmin Watch body battery. Was skeptical initially, but am surprised how well it works. It's a composite of sleep quality for gains (should recharge daily above 80 ideally) and physical stress, measured by heart rate variation, for losses.

Quasi-related to the body battery is minimal heart rate while sleeping (the watches automatic "resting" number is often higher, so I look at the chart). Relative to 2-week moving average it's a leading indicator of illness. I have nice charts for my recent covid and common cold, 1-2 days before the symptoms I could see unexplained (e.g. no drinks) higher levels. In absolute terms it correlates with endurance training and recovery after long training sessions (it goes lower with training in general, after a long session it is higher for 1-3 days, when it's back to low level it's full recovery, good time for further training).

Both help in simple decisions such as go to bed earlier, training intensity, whether evening coding session could be productive or better watch a movie, etc.

As a side note, it's funny how alcohol affects both metrics - same as illness + very low battery the next day. The metrics make me think twice and when both are bad it's better to skip drinking even if the context/schedule and subjective feelings are OK for it.

buybackoff··on Luau goes open-source
There is Teal language that has type annotations and could output plain Lua: https://github.com/teal-language/tl
buybackoff··on Three near-identical Boris Vishnevskys on St Petersburg election ballot
Lots of discussions whether it will work or not. Same as 10k rubles payout for seniors. Likely people are not so much stupid and such things won't work per se. But in Russia there is the second step: falsify the elections and explain that people voted for a fake or for the party they hate because of the payout. A casual observer will have less questions, or there will be an "explanation".
buybackoff··on Xiaomi becomes number two smartphone vendor for first time ever in Q2 2021
Well, I said "better in many aspects", not overall better. For me, the camera is not that much important. It's good enough on Xiaomi, but obviously it's better on iPhone.

It's personal preferences, for me the aspects of long battery life and turning the device into disposable cattle, not a pet, are much more important. The display on Xiaomi is decent, and that plus fast responsive apps the display shows is all I need from a phone.

buybackoff··on Xiaomi becomes number two smartphone vendor for first time ever in Q2 2021
For me the greatest value is 2+ days battery and the fact that I'm not afraid to loose/break €200 phone vs €600, while Xiaomi is better in many aspects. Went to it 5 years ago after using flagship Samsung models also for c.5 years, could not stand for abysmal battery and their UI.

Ad bloat could be disabled in settings, I did not see too many suspicious logs in Netguard (calls to Facebook APIs were much more frequent, even from apps that have nothing to do with FB). But that's is an EU country, I've read that Xiomi at least tries not to annoy regulators too much there with privacy issues, going for market share.

Also most bloatware (even their browser) could be uninstalled in 10 minutes, just google "Xiaomi debloat", or go directly to https://github.com/Szaki/XiaomiADBFastbootTools

buybackoff··on I Tricked Myself into Liking Running
I was the opposite of sport 11 years ago. Now on track to prepare to my 9th full marathon (plus registered, trained, but did not start on 4 due to injuries and sickness related to overtraining, covid lockdown, etc).

I would invert the search for motivation upside down. Sport is essential for mental + physical health (beauty, good mood, productivity for less abstract terms). Start with sport as the base line. Set your weekly load according to your current shape. And then ask every time: is there a reason NOT to run now? A real reason, not an excuse "I do not feel like...". Not sick, not injured, not overtrained (objectively from heart rate or body battery indicators, not own subjective feelings), the weather is below 30C and above -10C without heavy rain (or a treadmill available). That's it for me now. I just know I will feel great after 1km no matter how I feel before.

For novices, I would strongly recommend to run slower and have fun. Avoid overtraining as much as possible. For some, even 2km twice per week is too much. I've seen many friends hated running just because they tried to run too fast for too long and felt overwhelmed.

Register for a 5K in a couple of months. Races are the funniest part of the running story. But races are not just a distance on a day X, they are all the time of training that makes them joy, not an exercise in masochism. They discipline and motivate.

"If it feels like work then you are doing it wrong" - a qoute I read long time ago and it helped me a lot.

buybackoff··on F# is gaining independence from .NET
Slight correction: .tail prefix prevents inlining by JIT, it's mentioned in the second link in my sibling comment as "explicit tail prefix in callee". So even if that type specialization JIT optimization worked, the small performance-critical method containing it was not inlined. But the point of the specialization was to make the call for primitives faster than a method call, and fallback to a default implementation via callvirt. And there is no way to disable adding the .tail prefix to the calls that do not need it.

This also means that a lot of F# functions that are not inlined by F# source-code inlining itself effectively have NoInlining attribute. E.g. some helper method `if x then y.call() else z.call()`, if not inlined by F#, will never be inlined by JIT due to .tail prefixes before the methods calls.

buybackoff··on F# is gaining independence from .NET
But it adds .tail prefix before every callvirt instruction and this breaks some JIT optimizations. E.g. generic type specialization 'if(typeof(T) == typeof(...))' breaks, I had to dig into compiler source code to find out that it doesn't add .tail before ctors, used a struct wrapper and called a method in the struct ctor to avoid .tail prefix, but it adds its own overhead.

Also, most simple tail calls are rewritten by a compiler to a loop, but if you look at the generated IL, there are multiple temp variables, locals, needless assignments. Maybe JIT is able to eliminate those, or maybe not... In C# I could get IL that reflects what I write, without surprises.

buybackoff··on F# is gaining independence from .NET
> Inline functions are still fine though for writing zero-cost helpers, and I don't think C# has them (there's an <AggressiveInlining> attribute but IIRC it's just a hint, the compiler isn't required to actually obey).

In F#, you cannot disable inlining of small functions. It does IL source code inlining, like copy-paste, not machine code inlining. That increases generated dll/exe size a lot for generics. And sometimes you do not want to do that because it's worse for performance. There is an issue for that: https://github.com/fsharp/fslang-suggestions/issues/838

In C#, the AggressiveInlining attribute works well, in predictable manner. Non-inlineable cases are well known (`throw\switch\fixed\try..catch\calling delegates` and some more https://github.com/dotnet/runtime/blob/master/src/coreclr/ji...).

> because it supports directly inlining IL instructions intermixed with regular code

This works for very simple things only. And using InlineIL.Fody, Sigil, raw IL.Emit or just raw IL code as text is not that more difficult if you already know IL.

> you _can_ write F# that's about as fast as non-unsafe C#

I tried this several times. It always ends with fighting the compiler more than just rewriting in C#, even without the `unsafe` keyword. In most cases due to generated IL that I cannot control from F#.

buybackoff··on F# is gaining independence from .NET
F# generates weird, verbose, opinionated IL code that is often JIT-unfriendly and rather focused on reference types. JIT is tailored to C# patterns and JIT is rather simple in .NET (e.g. vs JVM), so it's easy to break or miss some optimizations.

Yes, it's not a fundamental limitation of the language itself. But considering the amount of hypothetical efforts required to fix all that vs investments from MSFT in F#, it is fundamental. F# lags by several years behind JIT and TPL improvements, the issues are mostly known. But it feels like it's not that important for F#. It's is not for writing fast libraries, but for Python-like use cases, explorative programming, or writing code fast when performance is not important (no hot loops in F# code) but strict typing discipline makes code less buggy and more maintainable from the first attempt. They used to say that "if F# code compiles, it's probably correct" - that is close to the truth, but do not expect top performance without fighting with the F# compiler. Even one of the best known and oldest F# library FParsec has it's high-performance parts in C# - that's telling.

buybackoff··on .NET GC Internals mini-series
And that book is as big as War and Peace by Tolstoy and Atlas Shrugged by Rand. So if you want to know the role of an individual memory allocation in the history of the entire application performance, it's a goto thing.
buybackoff··on Jetbrains founders turn billionaires without VC help
Their open source free pack is so great, many many thanks to them!

And they kill two birds with one stone. First, they support open source, which is great. Second, they increase conversion and loyal userbase. At my job I had a choice between Visual Studio + Resharper vs Rider, and I was reluctant to move from VS to IntelliJ IDEA based IDE, thinking R# is good enough and gives the same benefits inside a familiar IDE. I was so wrong, after trying Rider at home occasionally and pair coding at job, I gradually migrated. The IDE itself is much better, faster, nicer is big and very small details. Now there is no way back to VS, but that may not have happenned without the access at home. Other tools from the Toolbox are doing the same for other languages. Very smart of them to be so generous. Now even if my free pack is not renewed, I will pay for myself. And for foreseeable future I will generate at least one license at work for them.

buybackoff··on Vercel raise $40M Series B
It's ironic that the blog of next.js creators is not opening when cookies/localStorage are disabled. For two years I have whitelisted sites in the main browser and have a separate browser where everything is enabled but cleaned on close, so that I could read broken websites. I hope "the next web" they are building just works in a single browser without cookies/tracking at least for blogs/news.
buybackoff··on Paris to ‘get rid of 70k parking spaces’
Last time, it was announced in advance, but for weeks if not months no one knew when it would end.
buybackoff··on Paris to ‘get rid of 70k parking spaces’
Well, I want no taxation without representation, literally! Public transportation is financed from taxes. People who take jobs there must have some obligations, like I do to my employer. Why they should decide whether I should go to work or pay so much for taxi, if it's available at all? If those people working on public transport are not happy, I do understand them... But please announce everything in advance, not the Charlie Foxtrot situation that happened a year ago.
buybackoff··on Paris to ‘get rid of 70k parking spaces’
They are not followed in the first place and it's a problem. Drivers who work for 16+ hours per day cause road accidents. But those regulations are a good thing, same as for aircraft pilots.
buybackoff··on Paris to ‘get rid of 70k parking spaces’
So let me, please, pay zero taxes, during the strikes. Or the minimum that doesn't go to those who are striking. It's a public service, like medicine... What if one has an appointment to an oncologist at 11AM, outside of "service minimum" hours. It's so irresponsible!
buybackoff··on Paris to ‘get rid of 70k parking spaces’
I'm not sure, but it looks that OTP is much stricter measure than what I meant. I was talking about: I want to change from line A to B on station X (or exit on the station X)... Station X is closed, and I learn about that on station (X-1), or even just by not stopping on the station X.

It happened in Paris more than "extraordinary" number of times, so I have to put extra 15 mins to every important travel.

OTP sounds like: the train is scheduled at 3:25, it arrives at 3.26. Correct me if I'm wrong here. But if the normal margin is 5 mins for total time of travel, making it 15 mins is not nice.

buybackoff··on Paris to ‘get rid of 70k parking spaces’
So do you think that surgeons should be able to strike, when other people's lives depend on them!?
buybackoff··on Paris to ‘get rid of 70k parking spaces’
I was talking about the scheduled time - when it must work, but it doesn't.
buybackoff··on Paris to ‘get rid of 70k parking spaces’
What do you mean by "on-time performance"? I lived for 6 months in Manhattan on 112th and it worked fine. Probably one or two times my station was closed in the morning and I had to walk down to the next one.

And as someone who lived in Moscow for a long time I can attest it is the gold standard. It's the second busiest (or top-3) and just always works as scheduled. One rare thing one could rely on that comes from the government.

buybackoff··on Paris to ‘get rid of 70k parking spaces’
The number of metro stations is too big, they are so close that taking 1 stop ride is meaningless, walking is as fast. This makes metro very slow. But the number of RER lines is very low. Both are not very reliable - I mean the number of nines in 99.[here]%. I'm not even sure it's above 99% in Paris. Other than the strikes, I've had more problems with metro/subways in a year here than over 17 years in Moscow. Random unannounced station closures, someone forgets things on a station and a line stops for an hour, etc. And the strikes are a bad joke, why are they legal!? With the strikes, average reliability is < 95%.

I really like how NYC has local/express sharing the same infrastructure. Manhattan has near the same height as Paris (Peripherique), yet it's possible to travel all the distance with 5 or so stops.

← PreviousPage 5 of 7Next →