HNHacker News
TopNewBestAskShowJobs

fps_doug

944 karma · joined August 8, 2017

submissionscomments
fps_doug··on How to get a heart attack while using JEB decompiler (2022)
For further deobfuscation you might want to record runtime stats and code flow.
fps_doug··on Stop developing this technology
You're exactly proving the point GP makes, good job.
fps_doug··on I've had bad luck with transparent hugepages on my Linux machines
Had that problem too, and it's not the first time VMware was hit.

My "tune for vmware" script has grown to three lines over the years:

   echo never > /sys/kernel/mm/transparent_hugepage/defrag
   echo 0     > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag
   echo 1     > /proc/sys/vm/compaction_proactiveness # default 20
fps_doug··on What happens if you plug two USB-C laptops into each other using a USB-C cable
Does it matter which one is connected to the charger? If not, that would mean they adjust that "power level" value they send over the other port which is used to determine who charges who. While it would perfectly make sense to implement it that way, I'd also be surprised that manufacturers actually do.
fps_doug··on Tailscale bug allowed a person to share nodes from other tailnets without auth
I use a dyndns provider and SSH. Setup took maybe 15 minutes total.
fps_doug··on Tailscale bug allowed a person to share nodes from other tailnets without auth
Did you mean:

Same as outsourcing security: When shit hits the fan, you have somebody else to point your finger at. No inconvenient questions to ask withing your org, potentially having to blame someone you like on a personal level etc.

Worst case, you have to ask the guy who green-lit the outsourcing some inconvenient questions, but if the company you outsourced to is big enough, you can easily take the "nobody ever got fired for buying IBM" escape route.

fps_doug··on Customer returned $800 in books after using them to stage a home for holidays
When I was younger, a friend's dad used to run a millinery. We'd sometimes hang out there for half an hour after school and then his dad would take us home by car. I was always amused by that oddly specific sign next to the cash register saying something like "one week return policy, except for black or white hats". Every time I saw that sign my curiosity grew so one day I finally asked his das what was up with that specific exclusion. "Simple" he said. "White hats are for weddings, black hats for funerals. People would return them all the time, the day after the ceremony."
fps_doug··on IBM shifts remaining US-based AIX dev jobs to India – source
This is what I think. It's the old business model, which worked when everything was expensive, only really needed by big corps with deep pockets, and any machine a teen would have at home had nothing in common with the big irons at some insurance company. IBM would make big money, consulting firms would make big money, you being good with AIX would make big money.

Then with Linux, you could have what could run on any big server, for free, as a teen in your bedroom. You could poke at everything, look at the source code, ask around how you do this or that, since knowing how to do X wasn't some well-guarded secret to have an advantage over the competition, but something fun to share. Eventually those teens would get older and look for jobs or go to university, while at the same time Linux keeps on maturing, and now if you as a company want to build some system from the ground up, or just replace something ancient, you can pick that expensive well-established system from IBM, requiring expensive experts to maintain them, and program for them, expensive software, ... or go with that free OS that a lot of people know their way around with and ask for a much lower salary.

Of course, this didn't happen over night, especially the "it's free but there is nobody to yell it if it breaks" aspect of open source was very strange to $BIGCORP and seen as an unacceptable risk, but there was a steady shift towards that, also in large parts because it was pioneered by all those late 90s/early 2000s tech startups that were exactly created by those "Linux teens". Because that's what you tinkered with in college, not some proprietary OS that you couldn't even afford, or get updates for, or ask anyone for help if you got stuck.

fps_doug··on Ask HN: Can you recommend an “instant-switch” Monitor? Does one exist?
This is one of the things on my TODO-list for when I stumble upon a way to have infinite amounts of time:

Learn "FPGA 'n stuff" and build my own display controller. Like many people here, I don't understand why this takes so much bloody time. Not just the input switching, but also switching resolution or refresh rate on the same input. So either I'd have an a-ha moment and see why it's not possible (more likely outcome), or well, it'll just work and I can write a cool hackaday post.

The EDID explanation given in the comment currently at the top doesn't make too much sense: Even if the display is off and not in some super hardcore energy saving mode, EDID works, i.e. your computer can query the EDID data from the screen and know what its preferred resolution is, etc. Likewise, even if your display is switched to HDMI-1, a machine connected to HDMI-2 can already be outputting 1080p60 to it, so why does switching inputs take more than a few milliseconds?

Afaik (and I only have very rough knowledge here), there is no side-channel in HDMI/DVI that tells the display what mode it's actually receiving, so the display has to look at the signal and make sense of it. So you have to put some brains in it. But that can hardly take several seconds, i.e. hundreds of frames? Maybe two or three frames! I could see this being a cost cutting measure, maybe doing the dumb implementation that takes seconds instead of milliseconds saves you a cent or two per device.

fps_doug··on Intel is using DXVK for their Windows Arc GPU DX9 drivers
As stated by others in the comments section, DX9 is a huge, complicated beast. nvidia and AMD have decades of experience here, so dragging it along with new generations of GPUs is relatively easy. Intel would've had to start almost from scratch. They're betting on the future, where backwards compat with it becomes less and less important, and the power of their GPUs keeps increasing, so the overhead for older titles is getting less noticeable.
fps_doug··on GCC undefined behaviors are getting wild
I can't really follow. What would be wrong with making -fwrapv the default? i.e. let the compiler assume signed integers are two's complement on according platforms (i.e. virtually everything in use today). Then stop assuming "a + 1 < a" cannot be true for signed ints. How would that make existing code worse, or break it? It's basically what you already get with -O0 afaict, so any such program would be broken with optimizations turned off.
fps_doug··on GCC undefined behaviors are getting wild
... and people defending the status quo because "you just have to know how electricity works" :-)
fps_doug··on GCC undefined behaviors are getting wild
We've got a few components written in C that I'm (partially) responsible for. It's mostly maintenance, but for reasons like this I run that code with -O0 in production, and add all those kinds of flags.

I'd be curious to know how much production code today that's written in C is that performance critical, i.e. depends on all those bonkers exploits of UB for optimizations. The Linux kernel seems to do fine without this.

fps_doug··on GCC undefined behaviors are getting wild
But then again, UB doesn't mean the compiler author can't treat it as implementation-defined and do something reasonable.
fps_doug··on Breaking BIOS: enabling VT-x virtualization support on Acer Aspire One netbook
Bayfail was utterly broken on Linux until two years ago or so. There is a bugzilla entry with more than 1000 replies. And it appears that some platforms with that CPU still have issues with Linux, which according to that issue is yet another bug.
fps_doug··on KDE beats macOS
Absolutely this. UIs have been "good enough" for a very long time now. There were some minor breakthroughs/inventions along the way, but half of them were probably just responses to shifting usage patterns. You build up muscle memory and you're set.

One example that comes to mind is more powerful/prominent search features. In the 90s, as a home user, you had a folder with some documents and in total, the number of installed games plus apps was probably around a dozen. So it was ok that on Windows, searching for files was hidden in a sub-menu and rather slow. Today, you have a bazillion tools and apps, games, documents from 30 years of migrating to a new system, backups, so you make search faster to access.

People value consistency and gradual development, not failed, half-baked overhauls like the Windows 8 debacle. And obviously that stuff actually works. Which is continuing to be a big downside of KDE or Linux in general. Too many components working together, maintained by different teams and ever-changing. It's basically up to the Distros to find the perfect combination of library and software versions to get a good experience.

fps_doug··on OpenRCT2: Open-source implementation of RollerCoaster Tycoon 2 with new features
That was RCT1, and they released a patch quite quickly... I mean, at max half a year after the game released, obviously.

Now that you mention that again, I wonder what the underlying issue here was. Nothing in the game depends on the real time clock, and more importantly, how does reloading the saved progress at an arbitrary point in the future break things? I do remember though that poking around the game files I couldn't figure out back then where the progress is stored at all. When I moved to a new machine, I reinstalled the game and then copied over everything from the old machine, basically replacing the entire game, and still all progress was lost. I could still load the individual save games though–which I always saved right after passing the scenario, so nothing happened. Luckily I was only 4 or 5 parks in, so from then on I made sure to save individual scenarios right before passing them, never after, so the win condition would trigger again after loading them.

fps_doug··on We worked for 4 months to build a port for Stadia and today we finished it
There's not just users involved, see headline story.
fps_doug··on Native Linux GPU Driver for Apple M1
AFAIU, in the US to be on the safe side, you need to apply clean room reverse engineering, no matter the goal. In the EU, as soon as it's in the name of interoperability, reverse engineering is fine:

> The unauthorised reproduction, translation, adaptation or transformation of the form of the code in which a copy of a computer program has been made available constitutes an infringement of the exclusive rights of the author. Nevertheless, circumstances may exist when such a reproduction of the code and translation of its form are indispensable to obtain the necessary information to achieve the interoperability of an independently created program with other programs. It has therefore to be considered that, in these limited circumstances only, performance of the acts of reproduction and translation by or on behalf of a person having a right to use a copy of the program is legitimate and compatible with fair practice and must therefore be deemed not to require the authorisation of the rightholder. An objective of this exception is to make it possible to connect all components of a computer system, including those of different manufacturers, so that they can work together. Such an exception to the author's exclusive rights may not be used in a way which prejudices the legitimate interests of the rightholder or which conflicts with a normal exploitation of the program.

Directive 2009/24/EC

This would allow you to disassemble and modify any parts of OSX and its drivers in order to help write a Linux driver. Does the same apply in the US?

fps_doug··on Native Linux GPU Driver for Apple M1
That's the US. EU is fine.
fps_doug··on CernVM File System
We developed something similar in-house. For most images it's a notable startup speedup.
fps_doug··on Area 5150: 8088 MPH gets a successor
> Getting files to the PC is an interesting challenge.

I just put a NIC in mine and use the mTCP utilities. Easy as pie :-))

https://www.brutman.com/mTCP/

fps_doug··on I 10x'd a TI-84 emulator's speed by replacing a switch-case
TFA references a post that states that optimized switch statements in V8 are still just if-elseif-else and not jump tables, at least back when it was written. They might be faster than unoptimized JS, but certainly not as fast as jump tables. The author didn't even bother to split up the functions/switch blocks further when they learned about the requirements to get V8 to actually optimize a switch, as it seemed not worth it.
fps_doug··on Ask HN: When do you think Wayland will be broadly supported?
> I think it is not reasonable for you to ask them to never plan for a day when that could happen, if that is what you are suggesting anyway.

Then plan for it, architecturally, so that you can add or enable these features later on, or when you need it. Start with something sensible, appropriate for real-world usage. Wayland was everything but. With X11 the ship has sailed in that regard, but if you start over, don't create something that doesn't even offer these features in the name of security and then let the community come up with 10 different solutions to the same problems in the most uncoordinated way possible.

> Not if you were aware of the current issues with Xrandr and why it is a poor target.

xrandr works exactly fine for setting up your screens. You can pass resolution, refresh rate, position and orientation via command line in a simple and understandable way. It's a great example for a trivial real-world tool that should just exist.

> It is absolutely not trivial, and there are security/usability issues with it. To do this "the right way" would be more or less duplicating the entire KMS API into every implementation. Even XRandr is still missing features compared to that, so it is not an adequate solution either.

This completely confirms second system syndrome. It's only as complicated and non-trivial as you want it to be. I can only imagine what kind of convoluted security nonsense you think of when you say "the right way". Ask the display server for a list of screens and supported resolutions, and then tell it what you want to do with those. Done. X11 does it, Windows does it, macOS does it.

fps_doug··on Ask HN: When do you think Wayland will be broadly supported?
> Security? My whole $HOME is readable and writeable to just about any application I run; using Wayland is like locking my windows but leaving my front door wide open.

Exactly. Like, holy moly did the people working on Wayland get carried away by the mobile OS world. And second system syndrome too probably. I'm using $DISTRO because I trust them enough to not package spyware/malware in their repos. I know it's not 100% safe, there have been and will be security bugs that don't get fixed in a timely manner, or even ones that got introduced by distro-specific patches in the first place, but holy hell my OSS desktop is not a proprietary smartphone OS loaded with random closed-source apps from god knows who that tries to steal my data for profit. If I get pwned then it's certainly not through my display server.

I mean, eventually, like always, the open source world will get its shit together, and Wayland will probably become usable, but we only recently kinda solved the whole screen recording issue.

A few weeks ago I wanted to have a simple script, that would quickly switch between a couple display configurations. With X11 that was dead simple by using xrandr. It works with every DE/WM on this planet. You'd assume there's an equivalent tool for Wayland. But mumble mumble security, you cannot do that, so we got the same f#+ing situation as with screen recording again, every WM/compositor comes up with their own solution to something absolutely trivial. GNOME/Mutter have a dbus-API, wlroots-based ones have "wlrandr" via some protocol extension, KWIN I didn't even bother checking. But it's only 15 years since the project started right, why should something trivial as this have been settled upon yet? I even stumbled upon a discussion in an issue tracker that I cannot find just now where Wayland devs argued that you don't even want something like that. Like, go working for Apple with that mindset.

Give it another 10 years, and it might be ready to serve more than the absolutely trivial average Joe use-case.

fps_doug··on DwarFS: A fast high compression read-only file system
This is all true, but how do you think a more permissive license would improve things for open source authors? Maybe there is a miscommunication here, but how is a company more likely to give you money if you release under MIT oder BSD?
fps_doug··on DwarFS: A fast high compression read-only file system
> It's a tragedy of commons there's so little will to donate for or crowdsource open source projects and that they're taken for granted.

Which is not made better by your sentiment? I mean GPL at least forces you to either try negotiating a different license with the author (for money ideally), or suck it and use something inferior. Using a permissive license that allows multi-billion dollar companies to use your code for free certainly doesn't help changing the mind set of "open source is other people working for me for free".

fps_doug··on Xbox Cloud throttles performance if user agent is Linux
If I read the comments in that thread right, then the quality is also bad with Edge on Linux.
fps_doug··on Ask HN: First-time dad-to-be. What do you wish you'd known back then?
Even if you're somewhere in the middle, don't let the baby crying stress you out. It's obviously some sort of instinct that your crying child triggers, but really, they're not gonna die if you let them cry for a few more minutes. With my first child, whenever she cried, I got really stressed out and tried to figure out and then accommodate her as quickly as possible, as if every second counts.

Take your time, especially if you're easily angered, like the parent comment mentions. If your baby just won't stop crying no matter what you try or do and you feel like you might be losing it, just put it back in the crib, leave the room for 5 minutes and come back when you calmed down.

fps_doug··on Claws Mail
I think it's when you have processing rules in place for some or all folders, it seems they get applied to all messages again every time you open a folder. Normal filter rules don't expose that behavior, and I've been too lazy to look up what the difference is supposed to be. However, ever since I only add rules to "configuration" -> "filter..." I can switch between 5k+ message folders instantly (using IMAP).
← PreviousPage 2 of 8Next →