HNHacker News
TopNewBestAskShowJobs

ptspts

377 karma · joined October 2, 2014

[ my public key: https://keybase.io/pts; my proof: https://keybase.io/pts/sigs/C34Y9N0h_-KIkEDMgG6Jf5TicT20del-Z3zqVJh1afY ]
submissionscomments
ptspts··on Atuin replaces your existing shell history with a SQLite database
Except that this doesn't save commands which haven't finished yet, and it never saves the current pending command when the shell is killed (e.g. the user closes the terminal window or logs out or the SSH connection is broken).

Sometimes the rare, long-running commands are the most valuable.

If I set up history software, it should preserve all history, and as early as possible.

ptspts··on Show HN: Niui 3.0 – lightweight, rich, accessible front end
Indeed, the vertical scrolling behavior on mobile (Chrome) is terrible: it is flickering, and it is jumping around the site randomly, and it doesn't let the user see what was a few lines below the current text.

Please don't ever override the scrolling behavior of the browser of a website, it too often leads to inaccessible content and/or the user getting lost.

ptspts··on Beautiful branchless binary search
Most modern C++ compilers provide inline assembly. However, the syntax is compiler-specific and target-specific. Also it's (almost) impossible to use generic types with such inline assembly.
ptspts··on Netflix loses 1M users in Spain over password policing
Sometimes some shows are not available or you get different voice languages if you watch your Netflix from a different country.
ptspts··on Netflix loses 1M users in Spain over password policing
Also the software restrictions on the linked Netflix page seem to be arbitrary. When I download a movie in a DRM-free .mkv file, I can play it in all my browsers, all media player apps (typically VLC and MPV), and the HDMI version doesn't matter.
ptspts··on Netflix loses 1M users in Spain over password policing
On Windows, the standalone Netflix app and Netflix in the Edge browser support 4K resolution.
ptspts··on Only one pair of distinct positive integers satisfy the equation m^n = n^m
I think this part of the proof is precise. Which sentence is handwavy for you?

“e is between 2 and 3” can be considered common knowledge, it easily follows from thd proof that its defining limit converges.

ptspts··on Go 1.21 will (likely) have a static toolchain on Linux
The zig tool can also do this conveniently for programming languages C and Zig.
ptspts··on Subverting the software interview (2021)
There is “no way” to subvert this FizzBuzz interview when writing code in Python 3 only.

  def inf_range(a):
    while True:
      yield a
      a += 1

  def take(n, it):
    return [a for a, b in zip(it, range(n))]

  def fizzbuzz():
    return (a + b or str(c) for a, b, c in zip(
        (a for _ in inf_range(1) for a in (("", "", "Fizz"))),
        (a for _ in inf_range(1) for a in (("", "", "", "", "Buzz"))),
        inf_range(1)))

  print(take(30, fizzbuzz()))
For bonus points: which alphanumeric characters can be changed in the code above?
ptspts··on Airbnb removed my negative review
Is it possible to build proper noise insulation, which makes the house as quiet as the a house in a quiet neignorhood, to a newly built, modern apartment house?

I think it is, but construction companies are trying to savd a few cents, and they don't add proper noise insulation.

ptspts··on Clipboard: Cut, copy, and paste anything, anywhere, all from the terminal
Where is the actual, platform-specific business logic in the source code of this software?

All I was able to find was https://github.com/Slackadays/Clipboard/blob/6fd7e6b695ebe57... , which opens the X11 connection -- but where does it actually read/write the selection (clipboard)?

ptspts··on A book teaching assembly language programming on the ARM 64 bit ISA
On my Ubuntu, there are many cross-assemblers (including ARM, RISC-V and PowerPC) and linkers available in packages. These packages have binutils in their name. Once installed, the assembler command has -as at the end of its name, and the linker has -ld there.
ptspts··on Show HN: Portable Secret – How I store my secrets and communicate privately
Even if not, it's affordable to hire a programmer for a few hours to migrate the code to the newer API.
ptspts··on YouTube Transcript – read YouTube videos
Not all YouTube videos with spoken text have automatic captions.
ptspts··on Actually Portable Perl
Shameless plug: my earlier project StaticPerl, statically linked Perl 5.10 for i386 Linux and FreeBSD: https://github.com/pts/staticperl

Differences:

* Actually Portable Perl runs on more operating systems, StaticPerl runs on Linux i386 (requiring i686 or newer processor), Linux amd64 and FreeBSD with Linux emulation.

* Actually Portable Perl has more of the standard Perl modules and C extensions bundled. StaticPerl contains only a few modules, simplified, with documentation and non-Linux support removed. StaticPerl is unlikely to work with existing Perl scripts with many use calls, but it is useful to write new Perl scripts from scratch, and these scripts will work with both StaticPerl and regular Perl.

* Actually Portable Perl executable programs are larger (5 MB minimum, StaticPerl is ~1 MB) because they are compiled for amd64 rather than i386, and they contain more Perl and C code.

* The first time an Actually Portable Perl executable program is run, it modifies a few bytes at the beginning of the program file (except on Windows). Thus these programs don't work on read-only filesystems unless they have been run on a read-write filesystem first. StaticPerl doesn't have this limitation.

ptspts··on Actually Portable Perl
Depending on the task to be solved, a Bash script (using AWK, Coreutils etc.) executes much slower than the correspinding Perl or Python script, and having to run slow scripts often interactively can have a strong negative impact on developer productivity, especially on flow state (of mind).
ptspts··on India follows EU's example in requiring USB-C charging for smart devices
If such a high charging power level is needed anyway, does requiring USB-C charging make the power brick any larger?
ptspts··on ARM: Pragmatism, Not Purity
Another relevant meaning of signed pointers is pointer authentication.
ptspts··on Smooth scrolling 60fps on MSDOS 286
Was it common for pre-1995 CRT displays to work at 60 Hz?
ptspts··on Cheating at chess with a computer for my shoes
Is there a precise, published-in-advance definition of cheating in the chess contest rules, or are the contest organizers allowed to shift goalposts as they see fit, and ban a player from future contests because of any arbitrary reason they come up with?

My naïve definition would be: a player was probably not cheating if they would have been able to come up with the same moves even if they had played in an isolated room with only basic supplies (such as water and sugar for human players and electricity for computer players). Thus a player who is consulting a chess book, a friend, the web or a computer is cheating, because those are not available in an isolated room.

ptspts··on Show HN: Devbox – Easy, predictable shells and containers
It would be great if devbox displayed the recommended command to install Nix upon first run. First users of devbox shouldn't be expected to know the details on how Debian packages Nix.
ptspts··on Omyyyy/pycom: A Python compiler, down to native code, using C++
Possible reasons:

1. The JVM executes bytecode much (~10 times) faster than the CPython VM.

2. Unlike the JVM, the CPython VM and bytecode are not compatible with older or newer versions of CPython. (The differences are small, but they add up, increading maintenance costs.)

ptspts··on Python is Actually Portable
Not yet, because Tk itself hasn't been ported to Cosmopolitan Libc yet.
ptspts··on GCC Rust Approved by GCC Steering Committee
How do I get free beer at Oktoberfest?
ptspts··on The Uber whistleblower: I’m exposing a system that sold people a lie
Once I needed to catch an early flight, and no Uber drivers were available in my vicinity. But most of the time Uber and Lyft worked for me.

If there is a train to the airport, I usually prefer it, because it avoids (unpredictable) traffic jams.

ptspts··on System76 Lemur Pro Linux laptop with 14 hours of battery life
I'm explicitly looking for laptops with full HD display resolution, not more. I prefer the crisp pixels of low-resolution bitmap fonts.
ptspts··on Ask HN: Can I see your cheatsheet?
The zsh rm command doesn't with too many (say, 100 000) files, execve() fails with: Argument list too long. This works and it is relatively fast (runs rm in big batches): find ... | xargs -d '\n' rm --
ptspts··on Fresh is a new full stack web framework for Deno
Also, this can make me bounce: ,,payment failed, please start again with an empty shopping cart''. It happens on quite many webshops.
ptspts··on Mnist Demo Compiled On-the-Fly to WebAssembly in the Browser
Is this supposed to recognize a single digit? For me it can recognize only half of the digits correctly. What is the use case for sich a low-precision image recognition?
ptspts··on Tauri 1.0 – Electron Alternative Powered by Rust
A shell script provided by the app author can automate setting LD_LIBRARY_PATH and running the binary. It's very convenient for the end user. Lots of programs are shipped to Linux this way.
← PreviousPage 4 of 7Next →