Hacker Newsnew | past | comments | ask | show | jobs | submit | agapon's favoriteslogin

The terminology around this is really confusing, unfortunately.

Sometimes a distinction is made between "TTY" (teletype, traditionally separate hardware, now built into the kernel, accessed by ctrl-alt-f1, at /dev/tty1 etc.) and "PTY" (pseudo-teletype, terminal emulator programs running under X11 etc., at /dev/pts/0 etc. nowadays. Confusingly, the traditional paths used /dev/ptyxx for masters and /dev/ttyxx for slaves, which is not the same as the tty-vs-pty distinction here.) "VT" or "virtual console" are unambiguous and more commonly used terms than "TTY" in this sense. Serial, Parallel, and USB terminals don't really fit into this distinction properly, even though they're close to the original definition of teletype they don't support VT APIs.

There are many things the kernel provides in a real TTY (raw keyboard, beeper control, VCS[A] buffers, etc.). "The" framebuffer at /dev/fb0 etc. is usually swapped out when the TTY is (assuming proper keyboard/event handling, which is really icky), so it counts. Actually it's more complicated than "framebuffer" since X11/Wayland actually use newer abstractions that the framebuffer is now built on top of (if I understand correctly; I've only dabbled here).

Note that there are 3 special devices the kernel provides:

  /dev/tty0 is a sort-of alias for whichever /dev/tty1 etc. is currently active. This is not necessarily the one the program was started on; getting that is very hacky.
  /dev/tty is a sort-of alias for the current program's controlling terminal (see credentials(7)), which might be a PTY or a TTY or none at all.
  /dev/console is where the kernel logs stuff and single-user logins are done, which by default is /dev/tty0 but you can pass console= multiple times (the last will be used in contexts where a single device is needed).
This is probably wrong but hopefully informative.

Unless you're good at actually maintaining your gpg keychain and need other people to access this, I really wouldn't bother with gpg. There are way better and simpler options.

Age has a simpler interface and SSH key support https://github.com/FiloSottile/age

ejson2env has the environment variable integration and ejson has multiple backends https://github.com/Shopify/ejson2env

direnv can support any cli secrets manager per project directory https://direnv.net/

I've dealt with enough "why did this break" situations with gpg secrets files used by capable teams that I'd never recommend that to anyone. And unless you really need the public key support (teams and deployment support), you're unlikely to gain anything better over a password manager.


The trick is to still use the same underlying information, but forwarded to you by a large language model, that way you can take most of the credit yourself. How unsensational of an article would it be, if you said you followed a step by step guide and built the thing the guide built before. But slap an LLM between yourself and the tutorial and now you can suddenly say you built something with the help of AI. Weird times.

WhatsApp is no longer running FreeBSD. Prior to acquisition, everything was bare metal managed hosting at SoftLayer and we had all FreeBSD except one Linux host for reasons I can't remember (maybe an expirement for calling?). After acquisition, there was a migration to Facebook hosting that included moving to Facebook's flavor of containerized Linux.

Not because Linux is better, but to fit better within Facebook's operations[1], and Erlang runs on many platforms, so it was a much smaller effort to get our code running on Linux than to get FB's server management software to work for FreeBSD. Server hardware was quite a bit different, so we had no apples to apples comparisons of which OS was more efficient or whatever else. During initial migration, BEAM support of kqueue was much better than epoll, but that got worked out, and I feel like Linux's memory usage reporting is worse than FreeBSD's, but it's a weakness of both. I was never comfortable in the FB server environment, so I left in late 2019, when the FreeBSD server count was reduced to a small enough number that I ran out of things to do.

[1] Much of the server team had experience with acquisitions at Yahoo! and the difficulties of making an operations team focused on one OS support acquired teams on another OS. With the many other technical and policy differences between WA and FB, eliminating the OS difference was an easy choice to reduce friction. Our host count, which was large at SoftLayer, was small at Facebook, even after factoring in increased numbers because the servers were smaller and the operations less stable.


Related: here is my collection of links/domains which are useful, but difficult to search for on Google.

DNS / Networking:

- http://neverssl.com/ - manually trigger a paywall / login screen on public wifi networks

- https://ifconfig.co - Simplest way to get own IP address, especially from scripts.

Web development:

- http://vcap.me, http://lvh.me - Main domain and all subdomains resolve to localhost.

- http://nip.io - Subdomains resolve to that IP Address, e.g. `127.0.0.1.nip.io`

- https://httpstat.us - simple service to generate desired response codes

- https://badssl.com - test SSL client configuration against many invalid certificates

- https://permission.site/ - test various permission requests

Anyone have any other good candidates?



For others in similar position as parent (i.e. in need for a hand held portable Linux computer) but couldn't buy a GPD device for various reasons(availability, cost, trust issues etc.); Then here are two recommendations which are just as good(or better?):

1. Buy a used smartphone with postmarketOS support[1]. I suggest Poco F1 if you want to make phone calls with it right away (or) Oneplus 6/6T if you can wait a bit long for it to be fixed. I use Poco F1 as a daily driver and these are the most powerful, feature complete Linux smartphones right now.

If your work depends upon tool adamant on glibc and couldn't be compiled for musl then Mobian works on the aforementioned devices[2] too.

Use a foldable bluetooth keyboard, case with kickstand; you can get just as productive as a GPD albeit more portable and also feel good about taking away a device from potential e-waste.

2. Buy a 11" used Chromebook (Mainly used in schools) which is supported by Mr.Chromebox's UEFI firmware[3], You can use any Linux with it but I use PeppermintOS for its light weight and OOB support for Chromebook. Of course any portable laptop could run Linux, But they tend to cost 2x-3x the Chromebooks.

[1] https://wiki.postmarketos.org/wiki/Devices

[2] https://wiki.mobian-project.org/doku.php?id=install-android

[3] https://mrchromebox.tech/#devices


Reminds me of this awesome video - The Hustle: https://www.youtube.com/watch?v=_o7qjN3KF8U

Not sure about the weird settings disappearing bit.

But regarding the categories, Gmail doesn't automatically expose these to IMAP. But there is something you can do even if a bit hacky.

Create 5 labels named after the 5 Categories. Then create 5 filters each of which look something like this.

Search criteria: "category:primary" -> Apply label "primary".

Repeat the above step for all the categories. Et Voila. Your categories will appear in IMAP as folders of the same name.


Yep - this is the VFS shadow copy extension for samba, works great! Actually it doesn't require ZFS, just a method to create snapshots and find them - example smb.conf :

    vfs objects = shadow_copy2
    shadow:snapdir = /home/.zfs/snapshot/
    shadow:basedir = /home
    shadow:sort = desc
    shadow:format = auto:%Y-%m-%dT%H_%M_%SZ

Following Severance (which will be out in February) Apple TV+ will also release an eight episode series called "WeCrashed" based upon the WeWork saga in March [1].

And if you haven't seen it, there is also Mythic Quest (seasons 1 and 2) that is an Apple TV+ comedy series based in the offices of a game studio.

Also don't forget The Morning Show which is an Apple TV+ drama based in the offices of a fictional breakfast TV show.

So no matter what type of dysfunctional workplace you may enjoy, Apple will have you covered.

[1] https://www.apple.com/tv-pr/news/2022/01/academy-award-winne...


I don't expect to play any big AAA titles but I also remember only having Nethack and tux racer. So I am over the moon being able to play these current titles on Linux.

Caves of Qud, Dead Cells, Hollow Knight, Rimworld, Oxygen Not Included, Stellaris, Civ, Streets of Rogue, Pillars of Eternity and many more. Those are just my favorites so I hope others will list theirs.


I usually like to keep copies of the C standards drafts with me. In case anyone is interested, here are the links:

In case, someone is interested here are the various C standards drafts:

* C89/C90: http://port70.net/~nsz/c/c89/c89-draft.html

* C99 (N1256): http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf

* C11 (N1570): http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf

* C17/C18 (N2176): https://web.archive.org/web/20181230041359if_/http://www.ope...

Also, here is a nice Stack Overflow answer with links to C and C++ standards documents:

* https://stackoverflow.com/a/83763/303363

This answer usually gets updated as new revisions of the standards appear.


I found this during research and thought I'd share. It could be better, but it's a one-person project labor of love, so I'm pretty forgiving.

For new-ish parts, PCPartPicker.com is still the single best resource for this info, but their info isn't always entirely accurate. For a given board I was researching with USB3.0, PCPartPicker listed it as having USB3.1Gen1 support. For compatibility its built-in checking is pretty good for what it does, but if your use case demands specific I/O ports/functionality, especially dicey things like Thunderbolt over USB-C, always discover the ground reality for yourself from first-party sources, such as the OEM/vendor.

https://pcpartpicker.com/products/motherboard/

Here's some other motherboard research links I found:

https://acme.com/build_a_pc/boardfinder/

http://www.motherboards.org/mobot/stats.html


The South Coast (California) Air Quality Management District does some really thorough tests on the quality of the various low-cost sensors: https://www.aqmd.gov/aq-spec/evaluations/summary-pm

Povilas from the linked article here.

Having support in X (even if only in proposal stage) will allow much easier work in the toolkit and application layers. X and Wayland cover essentially al Linux users, so we will not need to estimate how many users will benefit from implementing gesture support in toolkit X or application Y. It will make convincing project maintainers easier.

This is really important, because maintainers of open source projects don't usually care about suggested features if they're not interested in them themselves. A new feature means additional work to them - discussing the design, reviewing PRs and handling of eventual bugs. Often the person who implements a feature disappears after the PR is merged. This makes the maintainers to view all feature proposals with a grain of salt. We need to have a convincing story of how majority end users would benefit in order to make the contributions easier.

Technical skill is not enough when contributing in open source. Politics are often as important.


As a user of both, they're quite different. Syncthing is written in Go and does one thing well -- syncing folders.

If you need more than that, like a web portal full of your files, sharing via web links, etc.... Try nextcloud.


Nice article. In particular the -i flag seems really useful.

I'd like to add two packages I learned about recently that I like A LOT: pyrasite and PySnooper.

Use pyrasite to "attach" to an existing running Python process (i.e. you forgot to instrument the app, but it has a bug in it, how can you debug?) (1) Install pyrasite (2) Get the PID of the running process (3) Run `pyrasite <pid> dumpstackz0.py` where dumpstackz0.pycontains `import traceback; traceback.print_stack()` (4) The stacktrace will be printed in the stdout/stderr of the running application

Use PySnooper instead of print-debugging—just add a decorator to any python function to get detailed debug info like you normally would get from a full debugger: (A) code: https://github.com/cool-RR/PySnooper (B) pypi: https://pypi.org/project/PySnooper/ (C) talk: https://www.youtube.com/watch?v=XP5imOJc_TE (D) podcast: https://www.youtube.com/watch?v=VUZvgJJKor0


I just did this the other day using the newest version (6.4.4) of LibreOffice Writer. It has a QR Code generator built in.

As mentioned by someone else it uses the form of:

  WIFI:T:WPA;S:{ssid};P:{password};;
Wikipedia has information on this https://en.wikipedia.org/wiki/QR_code#Joining_a_Wi%E2%80%91F...

Section of the Wikipedia article:

Joining a Wi‑Fi network

By specifying the SSID, encryption type, password/passphrase, and if the SSID is hidden or not, mobile device users can quickly scan and join networks without having to manually enter the data. Note that this technique is valid for specifying only static SSID passwords (i.e. PSK); dynamic user credentials (i.e. Enterprise/802.1x) cannot be encoded in this manner.

The format of the encoded string is:

  WIFI:S:<SSID>;T:<WPA|WEP|>;P:<password>;H:<true|false|>;
Order of fields does not matter. Special characters """ (quotation mark), ";" (semicolon), "," (comma), ":" (colon) and "\" (backslash) should be escaped with a backslash ("\") as in MECARD encoding. For example, if an SSID were "foo;bar\baz", with quotation marks part of the literal SSID name itself, this would be encoded as: WIFI:S:\"foo\;bar\\baz\";;

As of January 2018, iPhones have this feature built into the camera app under iOS 11.x. Android users may have the feature built into one of the device's stock apps (e.g. Samsung Galaxy S8/S8+/Note8 users can launch the stock browser, tap the browser's 3-dot menu, then choose "Scan QR code") or can install one of several available free apps such as "Barcode Scanner" or "QR Droid" to perform the QR Wi-Fi join.


Oh damn, such a rabbit hole :-p. Also found this list [1].

A couple on the list run BASIC! E.g. [2].

I just learned there's this thing "Windows 10 IoT", [3] a Win10 version for low power devices like the raspberri pi.

Would be interesting to try to run B8 in there!

1: https://github.com/paladin-t/fantasy

2: https://store.steampowered.com/app/767240/BASIC8/

3: https://developer.microsoft.com/en-us/windows/iot/Downloads


There are a bunch of these "fantasy consoles" now. From a quick search:

* Pico-8: https://www.lexaloffle.com/pico-8.php

* Liko-12: https://liko-12.github.io/

* Tic-80: https://tic.computer/

* Pixel Vision 8: https://www.pixelvision8.com/

I have no idea how they compare to each other.


Here is a list of osint tools I compiled after a fairly recent review for those who don't like maltego:

  https://www.spiderfoot.net/
  https://github.com/jivoi/awesome-osint
  https://github.com/laramies/theHarvester
  https://github.com/aancw/Belati
  https://github.com/intrigueio/intrigue-core
  https://osintframework.com/
  https://github.com/s0md3v/Photon
  https://github.com/lanmaster53/recon-ng
  https://github.com/kpcyrd/sn0int

I tried quite a few replacements, including ThinkPad X1 and LG gram. Something felt off in all cases, until I realized that 16:10 aspect ratio for 13in laptop was key. That frankly eliminated quite a few options. Additionally, X1’s trackpad and Gram’s keyboard felt quite bad.

At the end, in a whim, I tried a cheap Motile 142 from walmart ($329 at the time). 14in monitor seems to offset the aspect ratio quite well, the trackpad and keyboard are decent. Additionally, it is Amd 3500U, which seems well supported by the newer kernels. Upgrading with 16gb ram and NVMe ssd, also pushed the performance and usability of the machine.

At the end, I don’t think there is an universal answer to this. But with some experimentation, I’m pretty sure you can find a nice machine that works well for you.

PS: Motile laptop is also 2.55 lbs, which is a great weight for that size.


As others have stated there are much better guides than this.

I did this recently for fun, including the bootloader (I considered GRUB cheating!) The best tutorial IMO was https://samypesse.gitbook.io/how-to-create-an-operating-syst...

Some other useful resources I found:

  - http://3zanders.co.uk/2017/10/13/writing-a-bootloader/
  - http://mikeos.sourceforge.net/write-your-own-os.html
  - https://www.nasm.us/doc/
  - http://faydoc.tripod.com/cpu/
  - https://github.com/cfenollosa/os-tutorialjos

I also recommend Thoth's Pill, an amazing historical overview of writing systems that breaks new ground in animated video production... as they are describing alphabet systems and letter figures they are drawn in real time and presented on a clear crisp background.

Where most documentaries we've seen over the years show glimpses of photographs of ancient writing samples, often dimly lit or weathered and faded, tending to make it more about documents than language -- these folk are writing script and glyphs on computer, presenting detailed traces or brushing the characters and building alphabets, explaining down to the character/sound.

For children this is precious. If I had seen something like this when I was young, it would have sucked me in and maybe changed the course of my life.

https://www.youtube.com/watch?v=PdO3IP0Pro8


If you have kids, I strongly recommend Abby Howard's graphic novels on dinosaurs and other prehistory (Dinosaur Empire, Ocean Renegades, and Mammal Takeover). [1]

They not only depict the current understanding of dinosaurs as feathered, complex creatures (rather than always showing raptors shrieking and attacking), but also dive into the science of paleontology, evolution, and ecological adaption. Plus the art is fantastic.

I cannot recommend them enough.

It's been super fun to see my 5 year old not only enjoy them, but also point out where older books on dinosaurs got stuff wrong.

[1] https://www.amazon.com/Dinosaur-Empire-Earth-Before-Us/dp/14...


Stronger: Even if we were in agreement about right and wrong, that doesn't mean that we agree about what to do. We agree that homelessness is bad? Great. How should we fix it? There we may still differ, even if we agree that homelessness is a problem that we should try to fix. How sure am I that my preferred policy is more likely to work than your preferred policy? I would say that at best I am only about 70% sure.

The problem comes when I act as if I am certain that my policy proposals are better than yours - and, worse, that you are therefore evil for proposing such flawed policies as you do. We assign to policies a certainty that they don't deserve.

"In reality no political program can be more than probably correct." - C. S. Lewis.


Isn't it also important to note that wealth acquisition activities and wealth creation activities are not the same thing?

Windows XP installation CD doesn't have AHCI driver and cannot recognize hard drives on most computers since 2008, and only allows you to load an external device driver via a floppy disk, which is obviously not helpful. You can set your SATA controller to IDE mode in BIOS to install, but there's a performance penalty, and because of how Windows XP handles disk drivers, it's difficult if not impossible to enable native AHCI after Windows XP is already installed, you are likely to get a BSoD after you flip the switch.

A better choice is patching the installation disc to bundle a AHCI driver in it, works like a charm.

First, download and install nLite [0], a Windows installation disc modding tool, and then download a copy of Rapid Storage Technology driver from Intel (in zip format) [1] and decompress it. Finally, open your Windowx XP disc image in nLite, bundle driver "iaAHCI.inf", and burn a new CD. You can find a lot of tutorials on the web [2]. You may need to bundle other essential drivers as well, USB and Ethernet comes to mind.

I still have a Windows XP SP3 CD in my CD collection, it is the original MSDN version with an AHCI driver bundled, although I haven't used it in the last 6 years or so...

[0] https://www.nliteos.com/

[1] https://downloadcenter.intel.com/download/23295/Intel-Rapid-...

[2] https://www.prime-expert.com/articles/b02/installing-windows...


...or Owncloud [1], or Nextcloud [2], or Syncthing [3], or Seafile [4], all of them free software, none of them needing 'future discounts' like the Duple site promises to 'beta testers' since they are free software.

[1] https://owncloud.org/

[2] https://nextcloud.org/

[3] https://syncthing.net/

[4] https://www.seafile.com/


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: