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 Show HN: AutoHotkey for Linux
> I can't see any options around automating selection/clicking of dialogue box buttons?

I can only give you some technical details for ahk_x11 here. It would be ControlClick I think, here [1] is the Windows docs for it. Not present on ahk_x11 right now, I plainly don't know if it is possible yet [2]. If it is, I definitely want to have it. Other than that, I can only think of clicking on fixed coordinates, such as `MouseClick, left, 200, 300`. I haven't done `CoordMode` yet which would be rather important for that, out of sheer prioritization. For a generic solution, there's also ImageSearch [3] for more recent Windows AHK versions which I'd like to have at some point too. Some OCR command would be cool as well.

This will all take a while though, if nobody else joins in.

Thanks for your viewpoints though, I agree with the sibling comment that these insights are valuable.

[1] https://www.autohotkey.com/docs/commands/ControlClick.htm [2] https://github.com/phil294/AHK_X11/issues/3 [3] https://www.autohotkey.com/docs/commands/ImageSearch.htm

phil294··on Show HN: AutoHotkey for Linux
Wayland will be an interesting challenge, but I think there's still plenty of time before that happens.

If we figure out that this kind of automation is impossible on Wayland, I think it should still be possible to hook into the raw keyboard events with kbd and such, no? Requires root though.

phil294··on Show HN: AutoHotkey for Linux
Yes it's awesome and works on both platforms. But these are two different, independent runtimes both highly dependent on their target systems, so there can be no cross-os binary. For that, maybe ahkx [1] (abandonware) could be feasible because it builds on Wine, or, much rather, KeySharp (linked above).

[1] https://github.com/tinku99/ahkx

phil294··on Show HN: AutoHotkey for Linux
1. Thank you for the suggestion. I added the one-liner description from the Windows website to the top of the Readme.

2. Those words aren't in the Readme so I'm a bit confused. I guess these were just examples though. I am not a native speaker either though... if you really think there's uncommon words to be found, I would welcome a PR.

phil294··on Show HN: AutoHotkey for Linux
It's a simple and valid question, but I'm afraid the answer is rather nuanced. Most things you do with AHK are also possible on Linux in general, but in a much more fragmented way. AHK (in its complete form) unifies most functionality of xbindkeys, xdotool, GUI creation (no common tool I am aware of), popups, wmctrl, unix tools like echo/cp/, assistive technology, window manager tools, grabc, and many more, out of which some aren't even possible without sophisticated programming like Hotstrings (auto-replace while typing), ImageSearch, StatusBarGetWait and all those things. It also ships with many common programming language features such as math operations, and brings its own equivalents to unix tools like FileCopy and FileAppend.

Then there's also AHK's ease of use, which also makes it appealing to non-programmers or beginners. Every piece of logic (even loops etc) is basically encapsulated in a single-word command instruction, almost like ASM, but for humans. You create GUIs with `Gui, add, button`, maximize windows with `WinMaximize Firefox`, hotkeys with `a::MsgBox You pressed a` and so on, and all of that with basically no code. I'd recommend you take a short look at the AHK documentation, such as the intro or alphabetical list of commands. It gives you an idea of what you can do with it.

Besides, the entire language is visually oriented (and so is this implementation of mine): You create, edit, run, reload, and (optionally) compile scripts usually not by using terminal, but by context menus. This makes it far more accessible for people migrating from Windows, apart from the fact that you can apply your acquired AHK skills from Windows.

Finally, I have found that the existing Linux automation-specific tools (which mostly boils down to xdotool) are, in comparison to Windows AHK, inferior. Getting Windows-like automation functionality on Linux is quite a task. The main difference is that very often, you just don't need Window or Hotkey automation on Linux, because most programs are CLI-first, thankfully.

phil294··on Show HN: Ubähnchen – Animated subway map of Berlin
It's definitely a website bug, as goes from 1 FPS to smooth if you go to S+U and back to U again. (debugger didn't help, but it's all minified anyway)
phil294··on Show HN: Versioning Filesystem for SQLite
hm but can't you do the same thing (gzipping) with the db itself?

Edit. Regardless of if you maybe even meant that, I made a small test too: A 42 MB db zipped is 8.8M, but its sql dump zipped is 4.9M, so almost half the size. Pretty good already. If you don't just `.dump` but actually output the tables in a consistently sorted manner, the size might go down even more and will enable very efficient delta-ing. Questionable value to effort ratio though...

phil294··on Show HN: Density userstyle to remove spacing from popular websites
Thanks for your input. Yes, but I don't really know how to fix it. I mean we could add a guideline for future rules (and update the existing ones) to always use `max-width 45em` or the like for text instead of `100%`, whenever possible. That would complicate things quite a bit though, currently it's as easy as it gets...

I am also not super sold on capping max width. My personal take is, if text gets unreadable for you on a 27 inch screen, then don't buy a 27 inch screen, or at least resize the browser window accordingly. I haven't grasped yet why anyone would want to have a large widescreen display/window for reading text, I think it's only counterproductive.

That is admittedly a rather egoistic take though, and insane screen resolutions are seemingly becoming the norm now, so I don't know what to do.

phil294··on Show HN: Density userstyle to remove spacing from popular websites
It's funny you say that because I've been considering doing exactly the opposite: Adding a curated user style sheet for common websites which adds floating headers/sticky scroll/contextual scroll/semantic scroll/whatever you call it. Like this one for HN[1] (also mine), but everywhere. I'd honestly be curious why you dislike floating headers? Especially for navigation, I think it is preferable. I regularly make use of it, like here [2] (also mine, sorry for all of that)

[1] https://greasyfork.org/en/scripts/427429-hacker-news-context... [2] https://phil294.github.io/AHK_X11/

phil294··on Show HN: Versioning Filesystem for SQLite
This seems great, also in performance, but why would you use this over making plain file copy-based backups, since SQLite is single file based? I'd assume this solution might be preferable because it saves deltas instead of absolute, but the Readme does not say so. If the main advantage here is on-the-fly selecting from different versions, granted, that is unique, even though I cannot really imagine a production use case for this.

So far, I have been using file copies and GFS backup scheme based solutions like Borg, which also does deltas in chunks, compression, and encryption. Perhaps with Borg one should better even backup SQL dumps instead of db files, I don't know.

phil294··on Show HN: Density userstyle to remove spacing from popular websites
Hello,

imo the trend of websites adding more spacing (padding) as the years go by is annoying, so I decided to do something about it. I hope this to become a manually curated, collaborative effort, but so far the 500 lines CSS are for GitHub, GitLab, Reddit and Twitter only.

phil294··on Email doesn't suck – it's email clients that need improving
Spam is not Email's fault, but the mere result of its success/importance, which has only been possible due to its interoperability, which in turn facilitates spam.

It would be the same if we had all been using - say- XMPP for the last 20 years.

phil294··on FSearch, a fast file search utility for Unix-like systems
This just got its 0.2 release with complex search operators. This utility resembles "Everything" search on Windows and a very useful tool, so I think it's worth sharing.
phil294··on I miss the programmable web (2021)
I have another fun challenge, try to completely disable the auto-zoom-feature on Google Maps. Last time I tried, I stepped through 20 stacks of obfuscated nonsense before eventually giving up.

But tbh I can't really imagine any scenario that is near impossible - except for WASM driven web pages which will break just about anything :(

phil294··on HypeScript: Simplified TypeScript type system in TypeScript's own type system
This already exists, see [1]. Development has a bit stalled, but afaik the author wants to keep pursuing it. There's even a Discord server for this kind of project, see also this GitHub thread [2] where CS+TS is being discussed in general. Alternatively, you can code in Coffee with JSDoc type annotations, yielding a near-TypeScript experience in both IDE and output, albeit the annotation syntax can be a bit annoying, ironically.

[1] https://github.com/edemaine/coffeescript/blob/typescript/tes... [2] https://github.com/jashkenas/coffeescript/issues/5307

phil294··on The digital typewriter and the unnecessarily costly pursuit of focus
in case this helps you, the described effect is gone with JavaScript disabled. If these kinds of effects tend to annoy you a lot, you might want to consider a JS-whitelisting browser addon, I've had good experiences with one.
phil294··on Hands on Review of the Hisense A9 4G E Ink Android 11 Smartphone
Thanks, this is quite helpful. The constant phoning home to China is also my main issue with these devices. When talking about jailbreaking, are you referring to this thread? https://forum.xda-developers.com/t/is-there-a-way-to-root-hi... Because it looks awful, if even doable at best. I'd also ideally like to have some kind of LineageOS on there, but due to the speciality of the eink driver this is most likely far from ever feasible. Another question, is the map really usable in BW? I'd imagine a lot of information and usability being lost by the absence of color.
phil294··on If OpenSSL were a GUI
That wget GUI you are referring to and dragging through the dirt is a GPL Perl script from a lone programmer done in 2007 who did it out of personal motivation [1]. He provides his personal email address and asks for feedback through it. Have you contacted him?

It's fine to shit on proprietary garbage by huge companies which are involving UX experts into their development process such as Reddit or Facebook UI, but what you're doing is not cool.

[1] http://www.martin-achern.de/wgetgui

phil294··on How one guy ruined Hacktoberfest (2020)
* out of 60 people, I could determine it in about 90% of cases

...Is what I actually meant to write, this was a typo and the comment is locked now. :/

phil294··on How one guy ruined Hacktoberfest (2020)
yes, but what baffles me is that any spam, if ever, is directed at GitHub accounts directly, be it issues or contact addresses. The repositories themselves contain so many email addresses that are otherwise hidden from the platform. In a recent test of mine, out of 60 people that had their contact email hidden in their profile, I could still determine it by looking into commit authorships in at least some of their repositories. Why is noone targetting these? These are all active and often personal accounts, meant to not be discoverable.

IMO there's also no point in remaining silent about this, it's only a matter of time until the spam starts coming in over this channel. I'm pretty certain some day GitHub will cloak commit emails by default.

phil294··on Ask HN: How do you record your personal finances?
German banks support an open protocol: FinTS/HBCI with which you can automize stuff. There's a Python library for it [1] and I wrote my own little cli tool that allows you to configure your (potentially recurring) target vs. actual expenses, while setting expiration dates to get notifications about unexpected transactions. Still somewhat WIP though

[1] https://github.com/raphaelm/python-fints [2] https://github.com/phil294/fints-transaction-tracker

phil294··on Leaked Tokens in VSCode Extensions
If you need some sort of "compilation" (e.g. TS->JS, Webpack), you need to run that before the packaging command yourself. A VSCode extension mostly consists of a single package.json file with a "main" field pointing to some .js file. As far as I understand, vsce does not parse or handle anything, it just checks some metadata and includes the entire folder. This is also why extensions often ship with several files that are not required at runtime.

As to why - since extensions can do anything they want including running bundled binaries, there is no way for the IDE to know which files may or may not be relevant. That doesn't justify going an include-by-default strategy though, an allow-list would be much better.

Is this normal in JS ecosystem? Not really I'd say. NPM packages for example have a "files" property where you specify what to include, and I feel like the general trend is towards a saner approach of modules and imports anyway.

phil294··on The Modos Paper Laptop
Thanks for your insights!

> Some compromises simply have to be made. [...] A very lightweight terminal handler (reads keystrokes, updates display), paired with a larger system that fires up when Other Shit Needs Doing, such that the platform is effectively catnapping most of the time, might work out.

Check out PaperTerm [1]. I like it a lot and keep bringing it up, but there have been no other news about it yet.

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

phil294··on The Modos Paper Laptop
Sorry I don't have an answer, only more questions on this. I also read about this limitation. Perhaps it's more of a warranty issue and direct sunlight exposure merely reduces the lifespan by a few percent. Given that you have been using Waveshare displays a lot already, what are your observations on this? Is it really problematic?

I've been using an ancient ebook reader for reading recently, and contrast will be washed out to about 50% when exposed to sun while page flipping (until next refresh). However, I've been thinking this is due to the old age of the device.

phil294··on Ask HN: How do you deal with rude interviewers?
I guess it's mostly these guidelines: "Eschew flamebait. Avoid unrelated controversies and generic tangents. [...] Please don't pick the most provocative thing in an article or post to complain about in the thread. Find something interesting to respond to instead. [...] Please don't comment about the voting on comments. It never does any good, and it makes boring reading."
phil294··on Zq: An easier and faster alternative to jq
This is one of the purposes I think Deno should have been built for: Use JavaScript for oneliners in the command line. We had

    ... | deno xeval '...stdin processing code using special var $'
which was close to xargs in terms of conciseness. Unfortunately, it was removed as being considered "too niche" [1].

[1] https://github.com/denoland/deno/issues/3230

phil294··on EpubPress, turn web content into ebooks
I bought a Pocketbook 301 from 2007 for 13€ recently, as it is one of the few ebooks without internet connection. It has buttons, an SD card slot, it reads all common formats (FB2 works best), and it has an audio jack plug. You can use it for reading, and that's it. Probably the best product I ever bought.

No note taking obviously.

phil294··on Ask HN: How to change web page's grey text to black?
Generally, you'd use "user styles" for that, e.g. with https://addons.mozilla.org/en-US/firefox/addon/styl-us/, such as anything from https://userstyles.org/styles/ or just `* { color: black !important; background: white !important; }`. The problem is that while this works great for the majority of sites, it breaks the layout of some edge cases. For example, this also renders normally-transparent backgrounds as white and thus suddenly some elements are hidden.

Writing global style rules that work everywhere is hard and afaik typically avoided in favor of site-specific styles. I'm currently attempting to create one anyway (win95 appearance).

phil294··on Ask HN: Would you buy a modern Toshiba Libretto?
I'd probably buy one, mostly because there is no other e-ink laptop available yet. Regarding battery life, since you've got LTE on board, you'd be better off by offloading the processing to a remote server and connecting via ssh, vnc etc. imo. See also similar art: http://www.paperterm.org/notes.html https://news.ycombinator.com/item?id=28432921 and https://www.modos.tech
phil294··on Developers spend most of their time figuring the system out
Thank you for your insights! While the idea is interesting, the images on top of the SOCi article support your sceptism: Three programmers gathered around a tiny laptop screen is awful. You can always increase the font size though - I regularly work with a fairly large font as it is not as straining for long periods, but how do you persuade your coworkers to that? It takes quite some getting used to the diminished screen space.

That said, I would never want to join a company that has phrases like

> The mob disbands, either to sleep, or to their individual work

and

> [...] full 8 hours of programming [...] minimum expectations [...] additional time is expected to be put in

in what is basically their job description. Also, six to eight hours of non-stop webcam is horrible! https://news.ycombinator.com/item?id=24718640

← PreviousPage 3 of 6Next →