HNHacker News
TopNewBestAskShowJobs

phil294

1,761 karma · joined October 15, 2019

hi! you can contact me at hn@waritschlager.de or http://waritschlager.de

Userscript for sticky, contextual comment trees on HN: https://greasyfork.org/en/scripts/427429

submissionscomments
phil294··on Running GUI apps within Docker containers
I cannot recommend the mentioned x11docker cmd line tool enough for this. It takes care of all possible edge cases, supports different outlets (like nxagent or xephyr), focuses on security and exposes an easy interface. I'm using it for day to day work with VSCode, for example, to fix its atrocious security model, or more recently, to try out JPEXS (Java), IDA (wine) and AHK (wine). I specially like that this leaves no config or cache files left behind.

The article says you need a compatible image for that, but in my experience, everything launches just fine.

phil294··on Ask HN: Full-text browser history search forever?
I had a look into the extension's source: It's stored inside web extensions `storage.local` area, as `[time]: { text }` objects. It also keeps both a time index (timestamp of all existing entries) and a two week "preloaded cache" for quick access, which means all visited sites from the past 14 days are permanently in your browser memory. This could theoretically lead to memory problems, as the websites' texts are never truncated. If you search for text older than that, all entries for the specified time frame (determined using the time index) are retrieved from storage (again, possibly large amount of memory) and then processed.

This is all pretty clever and a reasonable implementation imo. I'm not sure what better way there could be using web extensions (that support FTS) - the only thing I could think of is a WASM SQLite module.

phil294··on The first RISC-V portable computer is now available
I was talking of the future, but you're describing the present! There's no reason why local neighbourhood datacenters and ubiquitous high speed mobile networks couldn't be a thing some day.
phil294··on Ask HN: Full-text browser history search forever?
Not quite what you asked, but perhaps interesting either way: I recently made an extension that keeps text only copies of all visited sites for offline usage [1].

No full text search included. Might be that grepping through the extension data is reasonably fast, even with multiple years of browsing history, however. I too see this data as valuable, so it's probably better to start capturing now and migrate somewhere else later, rather than wait for your desired browser to implement it.

[1] https://addons.mozilla.org/en-GB/firefox/addon/local-cache/

phil294··on The first RISC-V portable computer is now available
I really don't understand everyone's obsession with mobile computing power. Why aren't we equipping our our laptops with low energy processors and use them to remotely access more powerful stationary work stations via networking? Instead of carrying around 4.8 GHz all the time, I'd much rather have multiple days of battery lifetime. We must have taken a wrong step somewhere. I am still convinced processing outsourcing is the future for all things hardware intensive such as gaming, if it is not for some unexpected milestone in battery technology.

Besides,

> 4. which doesn't need batteries or plugging in

what do you mean by that? Would that include only solar-powered devices?

phil294··on First look: adding type annotations to JavaScript
CoffeeScript, for one, is already at least talking about emitting TS [1]. These kinds of changes are vigorously debated though, e.g. [2]. Once ECMA type comments get to stage 4, CS would probably also adapt the new syntax. Other compile-to-js languages that already ship with their own type system like Dart will probably be indifferent to the debated proposal.

[1] https://github.com/jashkenas/coffeescript/issues/5307 [2] https://github.com/jashkenas/coffeescript/issues/5394

phil294··on SingleFile: Save a complete web page into a single HTML file
How old is that demo gif? I just tried reproducing the normal saving shortcomings, and the bottom image ("Example of an SVG image with embedded JPEG images") loads just fine from the local folder, so this seems outdated.

That being said, it's a bit weird that this kind of tool is even necessary at all. I would have expected native saving to include CSS background graphics as well, but apparently they don't for some reason, so I think this is pretty useful. Until now, I have also used pandoc (--standalone) to merge all resources into a single HTML file which worked great.

phil294··on Things you don't need JavaScript for
I can't think of a solution to this either, but there are also other ways of doing non-refreshing requests sending by toggling background-images, loading=lazy <img> and so on
phil294··on Vue 3 as the New Default
Unfortunately, not even VueX, the official store management library of Vue, is compatible. There is a huge performance bug [1] that makes migrating larger Vue2 codebases impossible. Pretty disappointing, but noone seems to care.

[1] https://github.com/vuejs/vuex/issues/2102

phil294··on Cassowary – Run Windows Apps on Linux using a VM as if they were native apps
Games and basic UI elements work great, but there's still several WinAPIs unsupported. 2D drawing for example: Paint.net, the in my opinion best image editor in existence, is borked.
phil294··on Show HN: Link-Archive.org
Hi HN, this is most likely the most primitive internet search engine of all time, built with CommonCrawl data [1]. It would have been a feasible candidate to work with sql.js-httpvfs [2], a WebAssembly-compiled SQLite driver on a vfs to be able to omit the server part - but when I tried it, the performance with larger result numbers was a bit too slow to be usable, so it wasn't possible.

Try searching for your hometown, for example. You'll get quite uncommon yet interesting results. Full of spam though. It really makes you appreciate the enormous filtering that common search engines apply to their results.

[1] https://commoncrawl.org/ [2] https://github.com/phiresky/sql.js-httpvfs

phil294··on Deno in 2021
Neovim apparently supports the LSP protocol natively, so could you please explain why CoC is necessary?
phil294··on Modos: The World’s First E-ink Laptop
Aren't you leaving out partial refreshes here? Several e-ink tablets have achieved near-instant feedback for writing and typing. Full refresh times don't matter near as much for text processing, so I think you are overdramatizing.

Still, general purpose computing is indeed questionable. But why wouldn't it be possible to manufacture and sell such a device at < $1000? 13.3'' displays are at $370 [1], and the remaining specs are inexpensive [2] (given there is no ssd included). Solely depends on ones profit margin, it seems.

By the way, I appreciate your steady fight against malicious patent usage claims of e-ink corp by many users on HN. No idea if you are right, but it is admirable that you rightfully keep insisting on proof as there seems to be none.

[1] https://www.waveshare.com/product/displays/e-paper/13.3inch-... [2] https://github.com/Modos-Labs/Lancer

phil294··on Simple.css – A classless CSS framework
> just change the "import css" file at the top and have completely different styles.

I'm afraid I don't understand the goal here. This is excatly what classless frameworks like Simple.css are doing, and classless is imo a much better solution than us all agreeing onto standard variable names.

phil294··on The optional chaining operator, “modern” browsers, and my mom
Same thing with Android - while you can certainly still upgrade your apps, your OS won't, as most manufacturers want you to buy a new phone after a certain period of time (2 years, usually). I really hope to see an EU regulation to put an end to this consumer-hostile behavior some day.
phil294··on DuckDuckGo Traffic
Thank you for the link. uBlacklist [1] is a more popular alternative, also featured recently on HN [2]

[1] https://addons.mozilla.org/en-US/firefox/addon/ublacklist/ [2] https://news.ycombinator.com/item?id=29794372

phil294··on Tauri – Electron alternative written in Rust
I don't think that "consistent" always necessarily refers to pixel-perfect equality. When using this term in web dev, most would refer to browser standards as in spacing, layout, JS apis, availability of native elements etc. In this context, consistency is rather the opposite of negative. I don't think anyone really cares about how date picker looks on Firefox vs. on Chrome.

Maybe you are referring to Gtk/Qt vs. win32 etc. with their integrations in the operating system. I agree that they look and feel the best for their respective OS, but eventually require you maintain multiple unrelated codebases. It is understandable and necessary for this approach to die. A middle ground would be best, say, Qt support on all existing platforms. Or more likely, prettier browser defaults for standard elements like lists and tables, with browsers themselves respecting the underlying OS theme. Probably never gonna happen...

phil294··on Ask HN: What are you predictions for 2022?
> Matrix, Signal become mainstream

Which one? These two are not compatible. Besides, Signal I can see, but a possible Matrix mass adoption is probably still years away. Experiences from previous years have shown that there seems to be no incentive for a majority of users to move to decentralized protocols. Unless either WhatsApp or Signal adds compatibility, that is. Does not look like it's happening any time soon though: https://community.signalusers.org/t/make-signal-use-matrix-p...

phil294··on Windows 2000 Modernization Guide
Why not?
phil294··on Every Second Song
Cool idea, but why Twitter? Seems pretty unfitted, as you can't sort by date etc.
phil294··on Test your product on a crappy laptop
Thanks for your elaborate notes! This is helpful information.

When I tried your commands, on Arch via libcgroup-git, `cgcreate -g cpu:cpulimit` only results in `cgcreate: can't create cgroup cpulimit: Cgroup, requested group parameter does not exist`, for some reason. But this is not a support ticket, I have not researched this at all yet. But cgroups only limit some processes anyway, never the entire core(s) - so it seems one could also simply use cpulimit [1] instead which emulates by sending SIGSTOP and SIGCONT.

About cooling_deviceN: While this does limit cpu functionality, this seems to only also set `scaling_max_freq` to an appropriate value, throttling because the fans are disabled. Not more useful than setting the frequency manually I presume.

[1] https://github.com/opsengine/cpulimit

phil294··on Test your product on a crappy laptop
They have, kind of, it's the energy save mode.

On Linux, (besides GPU) you'd set /sys/devices/system/cpu/cpu$i/cpufreq/scaling_max_freq to cpuinfo_min_freq, for all $i. I always look for minimum (idling) CPU frequency in devices before buying them, but this info is almost never available. My laptop has a min freq of 800 MHz, but I would like to go even lower, to better test low performance devices and limit energy usage. In web dev, you can simply use chrome dev tools cpu throttling though

phil294··on Vibration API
How do you suggest web apps can be granted native app-like abilities, then, if not via a standardized browser API? PWA's are a thing, and arguably the future of app development (including wearable computers, the next big thing). If not: Least companies can afford to develop native solutions for every single manufacturer, granted there will be more than one. We'll be stuck with solutions like Cordova forever. A grim prospect on the future.

Another comment suggests bundled permissions for elevated apps, with a simpler prompt, if any. I think this is the inevitable way to go.

phil294··on Ain't no party like a third party
Here [1] is an interesting article that advocates for not blindly enforcing SSL everywhere as it makes deliberate mitm caching impossible. Also discussed in 2018 [2]

[1] https://meyerweb.com/eric/thoughts/2018/08/07/securing-sites... [2] https://news.ycombinator.com/item?id=17707187

phil294··on Two lines of CSS that will improve HN on mobile (IMO)
Custom user styles might work on Chrome, but on Firefox mobile, it's an atrocious experience. You need to install the nightly version, set some hidden developer flags, create a addon collection with your user account on addons.mozilla.org and type the collection ID in the settings of your mobile browser.

In other words, you can't really do it.

phil294··on Two lines of CSS that will improve HN on mobile (IMO)
I know I'm late to the party but this could do what you want: https://greasyfork.org/en/scripts/427429-hacker-news-context... (disclaimer, I made it)
phil294··on Ask HN: Why doesn't anyone create a search engine comparable to 2005 Google?
Bangs are not APIs. DDG does not access 13,565 APIs when you make a search request.
phil294··on Ask HN: What are these low quality “code snippet” sites?
Do you have any subscription lists you would recommend? [1] is the only related information I could find. Would be great to expand this.

[1] https://news.ycombinator.com/item?id=27994059

phil294··on Ask HN: What are these low quality “code snippet” sites?
...which even applies if you enclose the specific term with quotes. These used to help against unrelated results, but not so much anymore. I don't know why. Same thing with DDG and Bing.
phil294··on Linus on Line Breaks (2020)
When "visually scanning" code, in 90% of the cases, only the first 10 characters matter anyway, so I fail to see your point. How often do you really need to grasp, say, all function arguments at once?
← PreviousPage 4 of 6Next →