HNHacker News
TopNewBestAskShowJobs

pqb

847 karma · joined March 20, 2016

Software Engineer

GitHub: https://github.com/piotrkubisa

Email: [ my nickname ] at kodiga.pl

submissionscomments
pqb··on Faasd – Lightweight Serverless for Raspberry Pi
Actually, deb is way how to "distribute" software not to "just" install something. Let's say I would like to install Docker I will need to type following commands in case of Ubuntu:

  (
      sudo apt-get update
      sudo apt-get -y install \
          apt-transport-https \
          ca-certificates \
          curl \
          gnupg-agent \
          software-properties-common
      curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
      sudo apt-key fingerprint 0EBFCD88
      sudo add-apt-repository -y \
          "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
          $(lsb_release -cs) \
          stable"
      sudo apt-get update
      sudo apt-get install -y docker-ce docker-ce-cli containerd.io
  )
How would `.deb` help you to install/uninstall such software? Do mind mean embedding some scripts to add third-party repository and then install your app?

Even then, what it actually changes from the script I have already suggested in previous post? It is still about downloading two files (signature and packaged application) and install it (e.g. via dpkg --install).

pqb··on Faasd – Lightweight Serverless for Raspberry Pi
Good question, I personally find gVisor-like [0] snippets that suggests to copy & paste in order to install the program as the most pleasant way:

   (
     set -e
     URL=https://storage.googleapis.com/gvisor/releases/release/latest
     wget ${URL}/runsc ${URL}/runsc.sha512
     sha512sum -c runsc.sha512
     rm -f runsc.sha512
     sudo mv runsc /usr/local/bin
     sudo chmod a+rx /usr/local/bin/runsc
   )
Thanks to the used parentheses it feels like a "one-liner" script. Is there any better way to share installation script?

[0]: https://gvisor.dev/docs/user_guide/install/

pqb··on Nvidia Unveils GeForce RTX 30 Series GPUs
Yes, it was fantastic - minimal, elegant, simple, fast, had low learning curve and everything had a description - even icons in action bar[0]. As their competitors, namely iOS7+ and Android 5+ totally replaced gradients into flat design I was very welcoming the balanced UI redesign on my Z10[1]. However, autocompletion on their touch keyboard was probably the best [2], you had 3-5 suggestion that were spread around on the keyboard and to use them I had to place a finger below and flick it up. On BB Passport it was even more pleasant with physical keyboard - it had small gesture sensor and reacted on swipes in the air above the keyboard.

On the developer side, documentation was also amazing. There are tens of full, working example applications. BB10 used QT behind the scenes (Cascades UI). It had also a Python (2.x) binary on the device among other typical UNIX programs.

[0]: https://developer.blackberry.com/devzone/files/design/bb10/i...

[1]: https://developer.blackberry.com/devzone/design/bb10/10_3_vi...

[2]: https://developer.blackberry.com/devzone/design/bb10/keyboar...

pqb··on Kindle collects a surprisingly large amount of data
I would say exactly the opposite. I regret of buying a book from Amazon [0] dedicated to Kindle-use, because it is DRM protected and I am forced to use "Amazon Kindle" application, otherwise I cannot open it. I am usually okay with DRMs but I miss a fact I haven't bought it elsewhere with less annoying protection.

[0]: https://www.amazon.com/Designing-Data-Intensive-Applications...

Psst, "Designing Data Intensive Applications" was very good read. Do you know similar books that focus on distributed systems?

pqb··on A tale of webpage speed, or throwing away React
"Hydration" is a term often used on the backend too. I believe I have noticed it for the first time in Doctrine documentation, Object Relational Mapper (ORM), which is similar to Hibernate in Java - it was about transforming data retrieved from SQL database (memory) into usable PHP structure (object) [0]. In my opinion, this term has been perfectly described on the StackOverflow [1].

[0]: https://www.doctrine-project.org/projects/doctrine-phpcr-odm...

[1]: https://stackoverflow.com/a/6991192

pqb··on Show HN: InstaNote – notes in a simple chat interface
I miss "Saved Messages" from Telegram in the Element (formerly Riot) chat app. In Element it is also possible to create a private room with access limited to only me but in Telegram it feels so natural to send text and links to myself (even in way, way older versions of the app).
pqb··on A new company promises a 5G keyboarded BlackBerry in 2021
After two years I would expect issues like you have mentioned. It does not sound too good in my humble opinion. I guess you were doing more than just occasional work? :)

I have noticed they put MediaTek CPUs into their devices. Personally, I had bad experience with MT chips in various devices and they are putting me off to try out any of Planet PDAs. What is the Gemini performance in your opinion?

pqb··on Using a Yubikey as a touchless, magic unlock key for Linux
Personally, I only know Dell Precision 7740 to have built-in NFC. I guess tablet-like / 2-in-1 laptops might also have it.

Edit: Lenovo Yoga, Lenovo X1 Carbon have NFC too.

Edit 2: Dell Precision 7750 also offers it.

Edit 3: Models with pre-installed NFC module are very scarce, this site [0] lists only 204 occurrences among 7136.

[0]: https://geizhals.eu/?cat=nb&xf=3710_NFC

pqb··on Golang Desktop App with Webview/Lorca, WASM and Bazel
Yes, that's right. To be honest, I spent some time already to inspect and analyze its code, because I found it as a nice example to learn Rust by rewriting this project.

rxi/lite have tens of functions in C to provide operation of file-system, implement fuzzy-finder or simple rendering calls for rectangles. Rest of code is written in Lua that shares a lot of signature-compatible functions with Sublime Text API. There is only Lua, STB (stb_truetype) and SDL2. Also compilation script is basic shell script [0].

It is also worth noting there is interesting contribution to provide sub-pixel rendering [1] (now, a fork [2]) which includes usage of libagg [3].

[0]: https://github.com/rxi/lite/blob/master/build.sh

[1]: https://github.com/rxi/lite/issues/145#issuecomment-64155409...

[2]: https://github.com/franko/lite-xl

[3]: http://antigrain.com/

pqb··on Golang Desktop App with Webview/Lorca, WASM and Bazel
Indeed, however I think we might replace Go with any programming language and your comment will still make sense. Currently, web-browsers are the best have-it-all platforms, and outside web-technologies there isn't many good alternatives. We landed in 2020 and we don't have any complete, native-like, cross-platform GUI toolkit (if we skip Qt and GTK).

In last years a lot projects have appeared, which were trying to compete in GUI toolkit market share. All of them had its scope limited, however they brought quite fresh look on declarative programming interface [0][1], superb 2D rendering pipeline [2][3], ease of embedding [4] and adaption to low-power devices [5] but none of them is "complete".

Personally, I am amazed of the implementation of rxi/lite [6], which is just an app (C with Lua) based on SDL2 library. It uses 2x less RAM than sublime on 1GB file, has lower latency, covers clipboard, keyboard, mouse, drag and drop, some context menus but does it feel native? No. Among many issues, it is easy to report an error with screen-reading software but it is quite common problem in all aforementioned.

Perhaps in future, something like LSP specification will see a daylight, which in outcome will helps us to provide universal, modular, limited to certain scope libraries that can be easily plugged in case of need. Maybe then we will came closer to "native" GUIs. In my experience, there are numerous developers who were trying hard to deliver "complete" GUI toolkit but have failed.

[0]: https://github.com/cycfi/elements

[1]: https://flutter.dev/

[2]: https://github.com/linebender/druid

[3]: https://github.com/servo/pathfinder

[4]: https://github.com/ocornut/imgui

[5]: https://github.com/Immediate-Mode-UI/Nuklear

[6]: https://github.com/rxi/lite

pqb··on Convert paper-based notes to HTML content with Google Vision API
Outline might help a bit [0] - it preserves all the text but pictures are really small [1] and all headers are lost.

[0]: https://outline.com/KZqa5L

Edit:

[1]: Images on Medium can be resized by changing the expected width param, as in https://miro.medium.com/max/{width}/{filename} URI.

- Outline-generated link (width = 60 px): https://miro.medium.com/max/60/1*rNmb72I6rBUckbJuI6hRFw.png?...

- Resized to 1024px width: https://miro.medium.com/max/1024/1*rNmb72I6rBUckbJuI6hRFw.pn...

pqb··on KDE Slimbook: Linux Laptop with Ryzen 4000
FYI: Keyboards without the numpad block are called "TenKeyLess Keyboards" (sometimes it is abbreviated to TKL acronym) or 87/80% keyboards.

In short research, I found they are hundreds of them available on Amazon, Aliexpress. However, most of them have mechanical switches[0][1], some of them have conducted switches (like Topre[2]) and it is very rarely to see cheap, typical office-use TKL keyboards made by companies like Microsoft or Logitech but Matias have at least sell one model [3].

It might be handy to read a short guide [4] of keyboard naming by their sizes, whether you will look for new keyboard in future.

[0]: https://www.amazon.com/10-keyless-keyboard/s?k=10+keyless+ke...

[1]: https://www.keyboardco.com/category.asp?path=Mechanical%20Ke...

[2]: https://www.amazon.com/s?k=topre&ref=nb_sb_noss_1

[3]: https://www.keyboardco.com/category.asp?path=Mac/Standard/Te...

[4]: https://www.keyboardco.com/blog/index.php/2017/08/full-size-...

pqb··on New Leaks of the Lenovo ThinkPad X1 Nano
(A bit off topic) Two months ago, on reddit there was interesting finding and discussion about low quality screws in Dell laptops [0]. Also, if you look for "screw" phrase in r/Dell you will might find that problem is more common than occasional and touches many models, especially noticeable in XPSes.

[0]: https://www.reddit.com/r/Dell/comments/gf520r/xps_9570_aliex...

pqb··on New Leaks of the Lenovo ThinkPad X1 Nano
Oh c'mon, many laptops in last decade had 1366x768 display and many people still downscale theirs 1920x1080 into 1600x900 or 1440x810, because they have problems to comfortable see and read text from screen :)

Dell D-series are at least twelve years old [0] (example model with 16:10 display [1]).

[0]: https://en.wikipedia.org/wiki/Dell_Latitude#Latitude_D8x0_se...

[1]: https://www.notebookcheck.net/Review-Dell-Latitude-D830-Note...

Edit: I would love to have same resolution (1680x 1050) available from linked D830 (2007) in mine HP Probook 4340s (2012), which I used at university and Unity3D course. It had scrumpy 1366x768.

pqb··on New Leaks of the Lenovo ThinkPad X1 Nano
I don't feel right to ask this question using "Ask HN" - how many VMs you usually run?
pqb··on New Leaks of the Lenovo ThinkPad X1 Nano
Yes, they seem to have 2560x1600, probably the same display as Yoga [0].

[0]: https://www.notebookcheck.net/Leak-confirms-Lenovo-Yoga-Carb...

pqb··on New Leaks of the Lenovo ThinkPad X1 Nano
Isn't already a thing (or almost)? For example Dell Latitude E7470 14" (16:9) [0] and Dell Precision 5550 15.6" (16:10) [1]:

Dell Precision 5550:

> Front Height: 7.70 mm (0.30 in.)

> Rear Height: 11.65 mm (0.45 in.)

> Width: 344.40 mm (13.56 in.)

> Depth: 230.30 mm (9.07 in.)

Dell Latitude E7470:

> Front Height: 17.2 mm (0.68 inch)

> Back Height: 19.4 mm (0.76 inch)

> Width 334.00 mm (13.14 inches)

> Depth: 232.0 mm (9.13 inches)

Precision is bulkier (cooling and dedicated GPU) and by about 10mm is larger (in width) but it is close to mimic 14".

[0]: https://topics-cdn.dell.com/pdf/latitude-e7470-ultrabook_own...

[1]: https://topics-cdn.dell.com/pdf/precision-15-5550-laptop_own...

pqb··on New Leaks of the Lenovo ThinkPad X1 Nano
> 13.0 | 16:10 | 2K | 450nits | 100% sRGB | Optional Touch

> Ultra-narrow bezel | 85% STB

It is very nice move from the Dell [0], and also now Lenovo to bring 16:10 display in laptops. It was always for me strange decision, when laptop manufactures decided to use 16:9 displays for all, even for pricey, high-end models. I am highly enthusiastic to see 16:10 displays back after ten years, when numerous notebooks had 15.4" display.

[0]: For example Dell Precision 5550 - https://www.dell.com/en-us/work/shop/dell-laptops-and-notebo...

pqb··on Tutorial on building a desktop app with Go and Goey
I guess very close alternative to Goey will be GioUI [0]. It is really simple in the implementation, so it also covers many platforms as targets [1]. However, that is also a problem - there aren't many prepared components as in Qt or SwiftUI, no "native" feel of mouse or clipboard handling. One of the example of app I have found in the Internet is GUI for the password-store [2].

[0]: https://gioui.org/

[1]: https://www.youtube.com/watch?v=PxnL3-Sex3o

[2]: https://git.wow.st/gmp/passgo

pqb··on Show HN: I built an open-source SwiftUI app with an Airtable back end
Impressive work.
pqb··on A look at modern PHP
Of course! I believe almost all PHP devs noticed, they have terrible slowdown by Doctrine and used XDebug to check where is the problem. I am not PHP dev anymore and I hope it has improved a lot since my last adventure with this ORM but I'd still advocate to not use it on client-facing interface - you can use Doctrine only for database management (CLI), while for web interface use raw PDO or equivalent (Eloquent). You can also use cache or transform page into static-site. Sky is the limit.
pqb··on Ubiquiti adds phone-home to the access point firmware
Maybe pfSense/openwrt based on APU2[0] platform? I don't personally anybody who has used it. If on HN there is someone who would like to share his opinion about it, I'd be grateful.

Edit: Also, Turris MOX or Turris Omnia [1] might be an alternative.

[0]: https://pcengines.ch/apu2.htm

[1]: https://www.turris.cz/en/

pqb··on Bird – Internet Routing Daemon
> A ubnt edgerouter-x is good for up to about 800Mbps of NAT and runs an os derived from Debian and vyatta. Or something like a mikrotik rb4011.

Personally, I was thinking to configure network with ER-X for myself, but I quickly started to reconsider to take ER-4/ER-6 or Omnia, which seems to be few magnitudes better. Omnia is great SOHO router, it has better transfer over the air (5GHz on Turris it's between 900-950 [0]) than ER-X in eth-eth (700-800 [1]). If you aren't scarred of having a all-in-one device[6], then it might a great choice if you would like more possibilities, e.g. to setup few more services directly on Turris (i.e. PiHole, Syncthing) with mSATA disk, instead of using RaspberryPi with SD card (:scream:) for this purpose. In terms of pricing (for EU customers) pricing does not sound that bad (if you also looking to have a WLAN network), because ubnt ER-4/RaspberryPi 3B+/UAP Lite (note, it's slower MIMO 2x2) [2][3][4] is about 260+ pounds, for Omnia 270+ pounds.

[0]: https://bluegadgettooth.com/best-openwrt-router/

[1]: https://www.mbreviews.com/ubiquiti-edgerouter-x-review/

[2]: https://skinflint.co.uk/ubiquiti-edgerouter-4-er-4-a1749252.... (~160)

[3]: https://skinflint.co.uk/raspberry-pi-3-model-b-a1785657.html (~30)

[4]: https://skinflint.co.uk/ubiquiti-unifi-ap-ac-lite-uap-ac-lit... (~70)

[5]: https://skinflint.co.uk/turris-omnia-2gb-a1520592.html (~270)

[6]: I have heard following rule of thumb, that networks should be organized to have dedicated devices per given resposibility instead of having such router-switch-nas-godzillas, because of easier replacement in case of failure, maintenance, etc. etc. (just like in microservices architecture).

pqb··on GitHub is down
I will be that one, who will remind that git server does not have to be a gitea/gogs/gitlab/onedev/pagura/git-remote-{keybase,s3,codecommit,...} - you might provide a path to the WebDav server[0][1][2], if you need a very simple git server (i.e. served internally over 192.168/16 in office network, let's say RaspberryPi with an external USB drive or temporal repository share from own laptop to your colleagues).

[0]: https://cets.seas.upenn.edu/answers/git-repository.html

[1]: https://blog.osdev.org/git/2014/02/13/using-git-on-a-synolog...

[2]: https://git-scm.com/book/en/v1/Git-on-the-Server-The-Protoco...

pqb··on Microsoft’s Edge for Mac browser now available in preview
> helps web developers who want to test their sites in Edge

I am a bit biased after your comment. Microsoft Edge is going to have Blink as an underlying rendering engine, the same as in Chromium, Chrome, Opera, Vivaldi etc. etc. You have pointed out that it might "help web developers", then could you explain me how there might be some difference (even negligible) in rendering between those browsers since they all run on the same technology? It's not Trident nor EdgeHTML anymore, there won't be any star-slash-backslash, -ms prefixes, filter() nor other hacks [0] that we had to use for IE. It does not look like Microsoft is going to fork Blink anytime soon, because it will be quite the same thing as they would stay and continue development on EdgeHTML engine.

I don't see any advantage of having Edge on macOS, FreeBSD, Linux, etc. for web developers. However, in case of end-users the cross-platform browser have more sense, especially when they got used to specific features and ecosystem. Lack of macOS browser might lead to churn or a problem with adoption to it.

[0]: http://browserhacks.com/

pqb··on Xonsh: Python-powered, cross-platform, Unix-gazing shell
> I use zsh daily but type `xonsh` any time I do something in the shell that would normally require a google.

Personally, I stopped using `jq` in favor of python oneliners, they a bit more verbose but also cross-compatible, works out of the box (not everyone has jq, but most of people have python (pre)installed on their machines) and it is easy to implement a oneliner, i.e.:

   curl -X GET "https://httpbin.org/json" -H "Accept: application/json" | python -c 'import sys, json; print(json.load(sys.stdin)["slideshow"]["author"])'
Do xonsh helps you write a tar command without googling [0] or browsing a man?

[0]: https://xkcd.com/1168/

← PreviousPage 5 of 5