HNHacker News
TopNewBestAskShowJobs

tony

2,601 karma · joined October 29, 2013

open source software plumber

author: The Tao of tmux (https://leanpub.com/the-tao-of-tmux) available to read for free online at https://leanpub.com/the-tao-of-tmux/free

software libraries: cihai, unihan-etl, tmuxp, libtmux, vcspull, libvcs

https://tony.sh

(If what I say isn't helpful to you, disregard it. Spread the good will and good tidings!)

submissionscomments
tony··on From FOMO to JOMO: the joy of missing out
Good article

OP's post linked to an article that mentions elsevier. https://www.sciencedirect.com/science/article/pii/S074756320...

I keep seeing that name, it's related to Mendeley, an app for reading journals on smartphones.

Unfortunately it's 10-20 bucks to get the paper.

> Loneliness, envy

It seems to be a common theme in FOMO. This paper also tries to tie envy + loneliness <-> fomo: https://pdfs.semanticscholar.org/6a4f/4e27a55178bd1d9bd58744...

Surveys around this subject have weaknesses, this snippet from above sums up my feelings: "Another limitation derived from the self-reported nature of the questionnaires. Information reported by participants may have reflected socially desirable responses, rather than participants` true responses."

This is the big issue around this status / pride stuff. There's never going to be people admitting how they're sensitive about superficial things and there's this awkward silence to not break the fourth wall and talk about it. Lol

Why? Maybe because it's vulnerable self-disclosure and there wouldn't be reciprocity. If everybody went and said something like: "my primal fear is I won't be loved if I don't have status. I worry if I speak candidly about my feelings and attitudes, friends will abandon me. I feel I'm always caretaking to others and nobody cares about me. That's why I act out this way"

tony··on How a deadly fall revealed CIA secrets
They were psychiatrists from the 1950's. It was around the time the first antipsychotic was introduced and people naively believed psychiatry was this miracle. There are chemicals that make people impressionable, they're administered at hospitals and available in liquor stores.

IMO the most interesting (and impactful, powerful) stuff is just plain-old psychology, like what is read in therapy books. You can apply it in nearly any situation in so many ways.

It adds on to intuition you'd feel normally, the really complicated social behaviors we act out on into concepts and frameworks. You can choose how you interpret and use it.

If you don't believe me, google: Dialectical behavior therapy, attachment theory, schema therapy with "filetype: pdf" in the query and load em into PDF reader. Kindle has good books.

Schema Therapy: https://www.guilford.com/excerpts/young.pdf

Attachment theory: https://www.behaviorology.org/oldsite/pdf/AttachmentTheoryBe...

I'm trying to spread the message far and wide so people can know and get woke. This is stuff I wish I knew 15 years ago.

tony··on Microsoft Hosts First Windows Subsystem for Linux Conference
WSL 2 is the real game changer.

I'm on an issue for WSL 1 where there's a nasty bug when dealing with a lot of files. The only way you can free up the file system is to restart. https://github.com/microsoft/WSL/issues/2882

WSL 2 alleviates this file issue. There are some issues where daemons like postgres, mongo, etc. aren't started by default and sysctl.conf isn't respected. A manual command has to be ran.

Windows 10 is fast. It has amazing support for high resolution displays and multi-monitor that a light year ahead of anything Linux has unfortunately.

WSL also gives choice of distro. You get to use the stable packages instead of being stuck with a brew package that's broken.

tony··on Hong Kong leader to announce formal withdrawal of extradition bill
Nice!
tony··on Hong Kong leader to announce formal withdrawal of extradition bill
But Sun Yat-Sen is the founder of Kuomintang, an adversary to the communist party. He's revered in TW too.

Doesn't that imply legitimacy to the three principles?

tony··on Hong Kong leader to announce formal withdrawal of extradition bill
Not that, but him still being considered a national hero despite his having a different political philosophy.
tony··on Hong Kong leader to announce formal withdrawal of extradition bill
Random: Did you know Guangzhou (Canton) was briefly capital of China back in the day? https://en.wikipedia.org/wiki/Republic_of_China_(1912%E2%80%...

There's an important political figure in the history of modern China: https://en.wikipedia.org/wiki/Sun_Yat-sen

He studied medicine in HK. He lived in Hawaii for a time [1]. He had a political philosophy: https://en.wikipedia.org/wiki/Three_Principles_of_the_People

To my surprise I found Sun Yat-sen is still revered in China. He was Cantonese, like many of HK people. He has a University in GZ named after him!

If you would like to learn more about history of China this professor is fantastic: https://en.wikipedia.org/wiki/Richard_Baum, in particular, The Fall and Rise of China The Teaching Company, 2010 is really good. It's on audible.

[1] https://web.archive.org/web/20131016060255/http://media.nara...

tony··on ORMs Are Backwards
Earlier comments I wrote on ORMs: https://news.ycombinator.com/item?id=14661391, https://news.ycombinator.com/item?id=19853396

It makes it much easier to avoid errors and tab-complete relations across the object graph.

> Some ORMs offer to ‘mirror your live DB’ into a schema. That’s insane to me. It makes any type-checking or linting impossible. You have no idea what you’re getting.

Hm, I believe the author is talking about SQLAlchemy's sqlalchmey.ext.automap: https://docs.sqlalchemy.org/en/13/orm/extensions/automap.htm.... This is a relatively new feature in SQLAlchemy, no need to use it if you don't want (but it is pretty cool).

I can't speak for everyone here, but I doubt most ORM users are using it that way.

> Your test suite will be useless because your local DB probably is getting spun up from a schema.

Most likely a test database is spun up (if it's not a sqlite in-memory db). In the case of django it'll automatically prefix test_{databasename}, run migration files, and go to town.

> If not, then you have another hard problem of doing regular prod dumps to your dev environment. Yuck.

Which leads me to another benefit of ORM, adding fixture data to simulate very intricate states is much easier to do and maintain. Between tests, most likely, transactions are being rolled back.

Since you are using python, you'll be able to use pytest fixtures: https://docs.pytest.org/en/latest/fixture.html. I really like pytest-django, but I'm not sure how well the sqlalchemy equivalent is though. Maybe that's the area you could have having issues with, since when they have bugs, they're notoriously hard to figure out (is it how I'm bootstrapping sqlalchemy? is it my models? is it my fixtures? is it a pytest bug? or the pytest extension?)

> There’s always some surprise about the connection or pool type. It’s never straightforward, it’s always badly documented, it has twice as many layers as necessary because it has to manage bespoke session tracking and table registries. Transactions are undocumented or mysterious, autocommit is implied or hidden.

I recommend Django's ORM. I've used SQLAlchemy for years and couldn't tell you the default behavior cold. I believe autocommit is off by default unless you specify otherwise (https://docs.sqlalchemy.org/en/13/orm/session_api.html, https://docs.sqlalchemy.org/en/13/core/connections.html)

> We can’t have nice things until we move our schemas out of our app languages and into declarative spec languages like SQL, proto, or even jsonschema / swagger (though I’m not a great fan of the last two).

You could have your django (or whatever is using the ORM) server / etc. run an API. What are you building exactly? graphql will get you a typed API and have other languages use it via whatever you like (OAuth2?)

You're probably going to a main programming language of some sort doing the CRUD/migrations. Why? There's normally business logic / layer stuff on top, that's another +1 having other languages access via API may be used so there isn't duplication.

Are there cases where making API wouldn't work? If that's the case you're probably well beyond the ORM questions, and probably learned to just keep ORM to the basics - simple ForeignKey relations, staying away from polymorphism / stuff that doesn't map well to other languages where you may have to access SQL.

tony··on FreeBSD on the Lenovo Thinkpad
It'd be nice to diff a gist of an updated sysctl/rc.conf for this / whatever you use updated to 12.x.
tony··on Ask HN: I don't like front end anymore. What should I do?
> I'm overwhelmed quickly when i have to solve a (simple) problem with javascript, so i think backend would not be an option.

The truth though is JavaScript is a hard programming language. It has different environments like the browser and node. It has these specialized language transformations like babel that let you do different things based on experimental ES proposals.

How do you measure competency as a programmer? I've done very intricate stuff around CMake and tested stuff to run from source on multiple OS. I've contributed to a diverse array of open source projects across many programming languages and platforms. Despite all that - webpack/babel/node's behavior boggles my mind.

I question my competency routinely and look back and am confused at how I written such bad code. Even though at the moment I felt accomplished and think I've finally wrote something "future proof" and in good form.

It's okay to give yourself more time, if you're willing to. Frontend programming is so hard and moves so fast. There's no such thing as mastering it since every 6 months there's a leap in toolchain / libraries / etc.

If you are willing to grind it out, I've come to love TypeScript and React w/ hooks and find it scales very well on large projects. It is possible to get into a flow with webpack and co. if you can give it time.

tony··on What it's like to eject out of a military jet
I would not want to be in the position of ejecting. The stories I hear about bones breaking and even fatalities caused by the system seems like a risk in itself.

https://www.youtube.com/watch?v=fCORwUxlNQo - XB-70 mid-air collision ejection story

> ...Today, the ejectee will "only" suffer from 18 Gs...

Related: I'd like to extend this to also include atmospheric re-entry: https://www.youtube.com/watch?v=LCxNIaBC_r8 (bonus https://www.youtube.com/watch?v=c_bkY7-9c8s for channeling Rocky and Bullwinkle)

Diagram of re-entry window: https://en.wikipedia.org/wiki/Atmospheric_entry#Notable_atmo...

There used to be ejection seats in early space shuttles (https://youtu.be/CwLx4L5NRU0?t=419). After the mishaps with SS there was discussion about reintegrating ejection mechanisms, but it'd add weight, cost a lot to redesign, etc. This documentary talks about: https://www.youtube.com/watch?v=Ja4ZlswGvpE

tony··on Show HN: New version released 1.1 – Full featured Vue file upload component
I was delighted to find when I uploaded files, there was an icon for the filetype.

Additionally, it let me play my video when I added them.

The advanced demo is even more impressive. It reminds me of blueprint demos[1].

I wasn't able to get file upload progress on the main demo, I imagine because the blob sets immediately?

Also, both the list view and the grid view look very appealing. Starred.

Possible title optimization:

Show HN: vue-file-agent: Uploader w/ multi-file, preview, progress support

[1] https://blueprintjs.com/docs/#core/components/button

tony··on Knoppix 8.6 abandons systemd
Has anyone here used knoppix (or any other dedicated Live CD) recently?

In the early 2000's, distros didn't have live environments bundled. All debian used to have was a TUI installer and that's it. Ubuntu 4.10+ introduced a live sessions.

From 2004-now driver support and hardware detection has gotten much better. There are live session CD's that include "nonfree" drivers that further improve hardware support. You can pop in most popular distros and easily connect to WiFi and mount drives, often just as easily as knoppix did.

This complaint about systemd isn't a user-related, but the perspective of the live cd creator. Maybe it's true systemd doesn't help that case, but would systemd get in the way of a live cd user though? They're likely not going to be adding/removing/starting/stopping services, setting up users/groups, or anything else that'd be done in a permanent environment.

tony··on Border agents are checking social media, but we still don’t know how closely
https://www.thecrimson.com/article/2019/8/27/incoming-freshm...

> She said that she found people posting political points of view that oppose the US on my friend[s] list.”

It's not known if the friend is an ISIS member or merely someone posting memes ridiculing US policies - which can be contradicting and capricious, why? We have discourse, we vote for people who write legal statutes and appoint officials who makes further administrative/judicial decisions. They're subject to change.

Judges regularly reject government motions and can even strike legal statutes from the books. People can disagree with the law and argue about it. Laypeople can banter, even if they don't know what they're talking about.

Of course he doesn't have full political rights in US because he's not a citizen. And if he wanted to naturalize, wouldn't he be scrutinized on his background and interviewed?

He's reached out to the news, couldn't he volunteer FB posts made by the friend so we can know what we're talking about? He has to be a big fan of USA - hopefully - if he applied to Harvard and got accepted with a scholarship!

Off topic: Did you know the student is from Tyre? It used to be an island, https://www.ancient.eu/image/537/siege-of-tyre/. This is the city that Alexander the Great built a causeway to attack https://www.youtube.com/watch?v=-WkWy47ighY

tony··on Ask HN: How Do You Read?
Audible is absolutely epic.

On audible, I highly recommend lectures from The Teaching Company / Great Courses.

Great narration: https://www.audible.com/pd/Platos-Republic-Audiobook/B01CO38..., https://www.audible.com/pd/The-Art-of-War-Audiobook/B00URXOQ... (familiar voice to you?)

I've also had one of the worst narrations I've ever heard: https://www.amazon.com/Monkey/dp/B0162SWL4G/. I believe it was delisted on audible.com

tony··on Psychiatric Diagnosis Found to Be “Scientifically Meaningless”
The major findings listed in the article make sense:

> • Psychiatric diagnoses all use different decision-making rules

> • There is a huge amount of overlap in symptoms between diagnoses

> • Almost all diagnoses mask the role of trauma and adverse events

> • Diagnoses tell us little about the individual patient and what treatment they need

I think the alluring thing about diagnoses is it quickly gives closure, so we don't have to think, balance facts, or ask why. Check some boxes and we can draw a type of a person by characteristics as we would with the periodic table of elements.

We've been raised in a culture (or multiple of them), have an upbringing and have a story behind that impacts how we trust others, we need to be loved, have complicated emotions, we have impulses and drives, and sometimes there is a biological/chemical aspect to it, we're made of elements.

As a society, we're here now cooperating because we care to help each other. We're complex social beings, and it's hard to put us to a definition and have it do us justice.

One of of the big papers criticizing mental illness is this: https://psychclassics.yorku.ca/Szasz/myth.htm

Another one is Rosenham Experiment: https://en.wikipedia.org/wiki/Rosenhan_experiment

https://youtu.be/1MbARnJqjnc?t=519 - Some podcast talk on diagnosing mental illness / diagnosis and how not all clinicians would come to the same agreement on someone's behavior.

tony··on Ask HN: Linux laptop with good multi-touch trackpad
There may be more avenues left to try with your current hardware, before you make a choice:

Check to makes sure you're running a distro with recent enough Xorg/linux kernel (but not so bleeding edge stuff like libinput-gestures isn't supported). Also if you use integrated graphics, life may be easier since you can pick between Wayland and Xorg to find which DM supports inputs best in your case.

Xorg drivers: https://github.com/p2rkw/xf86-input-mtrack

libinput: https://wayland.freedesktop.org/libinput/doc/latest/index.ht...

libinput-gestures: https://github.com/bulletmark/libinput-gestures (example: https://gist.github.com/SkyBehind/d664448838d065428eded7eb6d...)

Gnome extension with some gesture edgecases: 3-finger swiping to different windows like macOS: https://extensions.gnome.org/extension/1253/extended-gesture...

Also if you really like trackpads and want a consistent experience, you can get a logitech t650 / apple magic trackpad and share your configuration for libinput/etc. across machines.

Edit: I reread and noticed you're trying to stay away from apple hardware. You could try logitech's trackpad, but apple magic trackpad may be better a la carte. If you did I'd recommend using via USB w/ bluetooth off to avert pairing headaches

tony··on Hong Kong ISP Association’s Statement on Selective Blocking of Internet Services
I just don't see it that way.

Without establishing any ground rules, (what similarities are we talking?) It's hard to do.

India, Canada, Pakistan, New Zealand, Australia, USA, Brunei. Former British colonies with bigger historical differences, isn't the final destination sovereignty?

Wouldn't Singapore be more analogous to HK than them though? For instance I never considered that Singapore broke away from Malaysia after Britain left.

Extradition bill in HK with support from the capital. Affirmative action policy in SG being imposed by the capital. Those kind of play toward the concept of a proud city-state breaking apart of a larger, country that doesn't seem to grasp what the people are feeling.

It reminds me of an unattuned parent trying to force their child behave a certain way when they're already stressed out by something else. If it goes too far, it creates this spiral and the child suffers, and has to leave the family. Obviously having people who don't care to understand your feelings in charge of your life isn't tenable.

What if HK were to decide "enough is enough", to move out, and live their own life? They have a developed economy, their own legal system, health care, and civil servants. They can make their own decision without a power thousands of miles away with a totally different organizational philosophy trying to control them.

Aside: If we wanted to contrast HK <-> SG, I'd probably pick different things. For instance Singapore speaking Mandarin and being more diverse culturally/linguistically. It's really cool. Look at this: https://en.wikipedia.org/wiki/Languages_of_Singapore#/media/...

tony··on Show HN: Lunch Money, a personal budgeting tool with multi-currency support
TypeScript is a beautiful thing.

The next level things that powered me up are:

- relay + graphql : map queries/mutations and object types to typescript. I have a workflow at the moment where python + graphene typings "bubble up" to typescript types via schema.graphql

- React.FC + hooks : makes it that much easier to grok a component in a large codebase.

- prettier : automatic code formatting on save, configuration works project-wide so all team members commit organized code

- DefinitelyTyped being reliable when it comes to releasing packages has helped a lot

I don't even use the autocompletion / go to definition that editors also usually bundle, but it's there, especially with VSCode. When the pieces don't fit, tslint catches it initially, if not that tsc.

Also, despite only using TS less than a year, the typing errors have been getting more friendly in the past few TS releases.

tony··on Hong Kong ISP Association’s Statement on Selective Blocking of Internet Services
I'm not an expert on Catolonia and Spain, but I don't see it that way.

I've likened Hong Kong to Singapore. It's leaning toward being fully independent and the momentum seems unstoppable. The question I'm wondering is why stop at HK? I want my access to KuGou back. That's what did it for me.

Spain and Catalonia both use the Euro. Catalonia has its own judicial system, but I believe they both are set to the EU in terms of bigger picture things.

HK and PRC have separate currencies. HK uses traditional chinese characters and speaks Cantonese. Not everyone in neighboring Guangdong speaks Cantonese, and they use simplified chinese characters.

Hong Kong has its own famous movies. It has its own cellphone companies and ISPs. Its own stock market. They drive on different sides of the road (left in HK, right in China). HK has trams. HK has its own customs. The legal system is in english and its a common law system and dramatically different than China's.

tony··on Hong Kong ISP Association’s Statement on Selective Blocking of Internet Services
If it turns out PRC messes with HK's traffic, PRC is going to lose a load of trust over this.

Businesses relying on VPN'ing home to function, those believe its a human right to choose their leadership.

Why shouldn't the fragrant harbor enjoy same autonomy the rest of these received?

https://en.wikipedia.org/wiki/List_of_countries_that_have_ga...

What's there to fear? Do Hong Kongers not share the same kindred blood, language (as far as Cantonese, at least in Guangdong), culture.

Why not let Hong Konger's vote for independence? Scotland had a chance in https://en.wikipedia.org/wiki/2014_Scottish_independence_ref.... What keeps it together? I don't know. Trust? Respect?

Is there trust and respect between HK <-> China? I've been between GZ/HK many times. They're different places. If PRC wants to be an example to others of their own philosophy and system, they should do it by building trust over time, not by using a hammer.

tony··on TypeScript 3.6
What would be the downsides of TypeScript, from your perspective?

In a large codebase, having typings, even basic ones, go a long way.

I don't know about the term static typing or if that's what really helps. I also annotate for readabilities sake. For instance, it's nice to know a variable in python is only intended to be 'ACTIVE' or 'INACTIVE':

    from typing_extensions import Literal

    ActivityStateLiteral = Literal['ACTIVE', 'INACTIVE']

    # Lower in the code, e.g. inside a flask view
    activity_state = ActivityStateLiteral = request.GET.get('activityState')
For TypeScript:

    type ActivityStateLiteral = 'ACTIVE' | 'INACTIVE'

    // e.g. react component
    const activityState: ActivityStateLiteral = props.activityState || 'ACTIVE'
That leaves me no doubt when I/a team member comes back 3/6 months later that I'm only dealing with 2 possibilities of what that variable can be (or should be). The intention itself also valuable, even if incorrect.
tony··on Thunderbird 68.0
(I have not tried Thunderbird 68 yet, but have tried a fairly recent one last month, unknown version though)

Favorite interface for mail clients are Airmail (macOS), Mailbird (Windows), geary (Linux).

The thing they have in common is unified inbox, merging of threads, controlling signal-noise.

If thunderbird took that UX approach, had undo send, it'd be indispensable.

There are also small things, like google apps 2FA working out of the box, searching email, that for some reason haven't worked as well for me w/ thunderbird yet. I'm not sure if searching gmail is doing it through their API, or by downloading all mail, but I've had issues with that.

tony··on Show HN: Firestorm – An ORM for Firestore
Starred.

If I ever try Firebase it will be nice to have this.

Code looks nice! Except like sibling commenter I'm not sure what good typing/programming would look like if doing an ORM in TS.

It's my first time hearing about Firestore by the way. My understanding is Firebase has a real time store, but Firestore is a different tool, similar to MongoDB?

Link to Firestore: https://firebase.google.com/docs/firestore

tony··on Ask HN: Best Linux Laptop Replacing a Macbook Pro?
Echoing this. Lenovo X/T/P series with the big warranty. This gets you quality components that should work well across linux distributions.

If you're doing external monitors that are 3K, 4k, etc it's very difficult to pull off. Gnome 3 with fractional scalings (Ubuntu 19.04, debian experimental gnome 3.32+) make this possible. It doesn't work with NVIDIA's proprietary drivers at the moment.

You can also try to meet things half way by using Windows 10 with WSL 2.

tony··on Ask HN: What are you learning in 2019?
1. TypeScript - I have had remarkable experience TS on frontend. Along with react hooks. Turns ES into a powerhouse.

2. GraphQL - Typed, structured API.

3. https://en.wikipedia.org/wiki/Attachment_theory: A very powerful tool to explain human behavior. It can explain individual personal interactions, personal and professional relationships, family systems and many bigger picture things.

4. How to build desktops: Build times are way way faster on desktop CPUs. More control over motherboard / getting faster IO, further improving buildtimes. More upgradeable, things can be switched out, whereas with laptops everything is soldered together.

5. Language practice: Started tapes on Polish / Ukrainian. Restarting Chinese soon.

6. Basic fitness things / more exercises

tony··on The Dysfunctional Trillion-Dollar U.S. Fighter-Jet Program
I wonder if there's a system where the contractors apart of the program, which according to the news reports are so above budget / behind schedule, could submit post mortems to whichever agency audits this program. What hurdles they wish they knew going in.

Similar to this: https://mozyrko.files.wordpress.com/2014/10/77-failed-startu...

tony··on Ask HN: How to be less argumentative online?
Amazing. That is succinct. Bookmarked.

That's different from other translations: http://wengu.tartarie.com/wg/wengu.php?l=Daodejing&no=30

If Mitchell branched into more classics, that'd be very valuable to the cause.

tony··on SuperSQLite: SQLite library for Python (2018)
Any features in this library you'd like to see standard library's sqlite3 [1]? Maybe a PEP [2, python enhancement proposal] could do it.

[1] https://docs.python.org/3/library/sqlite3.html

[2] https://www.python.org/dev/peps/pep-0001/

tony··on List of military tactics
https://youtu.be/wKi3NwLFkX4 - Gen. Schwarzkopf's Famed News Conference

He doesn't get 5 minutes in without getting into logistics.

← PreviousPage 6 of 8Next →