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 Show HN: DOME, a framework for making 2D games with Wren
Nice! Starred.

I did "sudo apt install libsdl2-dev", make, and "./dome examples/spaceshooter/main.wren"

Took less than 30 seconds to build. The game ran instantly.

Also I ran it through WSL 2 with these instructions: https://github.com/microsoft/WSL/issues/4793

Thank you for this! First time I've heard of wren also.

Aside: Is it possible to do something like sockets / http requests through wren?

Where do you plan on taking this? What inspired you to make it?

tony··on MacBook Pro 16 Has a Fan Problem
If you happen to be in the same spot for a few months, I highly recommend building your own PC.

More information on why laptops don't work: https://www.youtube.com/watch?v=947op8yKJRY

I've been through so many laptops. After I tried a desktop in 2019, I can't seriously consider a laptop, unless in a pinch. Even so-called "beefy" workstations, e.g. W series Thinkpads, I've returned. They throttle too.

You want to know what beats a $3500 Macbook Pro? For me, a desktop with "ok" parts and water cooling.

You'll never have a fan issue. You get to use high quality parts that are replaceable with their own warranty.

Even the cables are super high grade. And you still come in at a third of the cost, slightly more than half the cost if you want to splurge.

You'll never have slowdowns. You can power multiple 4k monitors, ultrawides, whatever you want.

It boils down to keeping all these parts in a small chassis. If Apple cared, they'd stop the soldering and add an inch and half thickness and let the thing ventilate, because these things are built for consumption, not creation (e.g. being under an intensive rendering/compilation/io workload).

tony··on Pygame Zero: Creating games without boilerplate
pygame has successful deployments onto steam, but it doesn't show us developers that would have used for pygame if it wasn't for licensing concerns.

LGPL in scripting languages is a gray area. There are no previous legal cases to cite. Python projects have transferred away from LGPL due to its ambiguity. Example dating back to 2004: https://twistedmatrix.com/pipermail/twisted-python/2004-May/...

Namely around the language of what creates a derivative / combined work:

LGPL was intended for languages that use header files, like C and C++. So, if a project was ever accused of creating a combined work, they'd be on the hook to defend the the case, whether or not a combined work is created. In v2, the license even shifts the question onto licensee/licensor: "The threshold for this to be true is not precisely defined by law."

In licenses such as BSD/MIT/ISC/etc. these issues do not arise, and a breeze through top python projects show reciprocal contributions and access to source are commonplace without viral clauses in licenses.

I write about LGPL/python at length before here (2013): https://github.com/ScottDuckworth/python-anyvcs/issues/32#is... and (2016) https://github.com/PyGithub/PyGithub/issues/468#issuecomment...

For gaming, it's even more relevant, because if the deployment is to steam or a mobile phone (like what kivy does with https://github.com/kivy/python-for-android), that could easily be interpreted as a combined work. They're not like C/C++ application linking to .so / shared libraries.

tony··on Pygame Zero: Creating games without boilerplate
Incredible!

The sphinx docs look great. Also, the logo! Not to mention, the translations:

- https://pygame-zero.readthedocs.io/zh_CN/latest/

- https://pygame-zero.readthedocs.io/ja/latest/

- https://pygame-zero.readthedocs.io/sk/latest/

One reason of why I wouldn't use it yet: LGPL.

This is the issue pygame had when I tried it. The license made it very difficult to incorporate and use in practice, and I ended up playing with kivy instead (https://github.com/kivy/kivy). The reasons why:

1. Writing anything commercial would be a gamble. I've wrote at length on why this license isn't meant for scripting languages, but even if it's a compiled language, SDL moved away from LGPL here: https://youtu.be/MeMPCSqQ-34?t=430.

2. LGPL and scripting languages just don't work from an open source perspective. It's not copy-paste and vendorize friendly. Functions can't be copied a la carte. I'd rather write something from scratch than link an LGPL library in one of my MIT licensed projects. I'm just not willing to open downstream users to the risk. What ends up happening is 5/10 years on, someone ends up writing a new MIT/BSD library to get around a viral one (e.g. GCC -> Clang/LLVM).

tony··on Responsive Pixel Art
If you are interested in the code behind bitmaps / pixel sprites that scale, pan, and zoom, I'd like to offer up OpenTTD.

https://www.openttd.org/

Specifically, Viewports, Blitter and Resize handling:

Viewport: https://github.com/OpenTTD/OpenTTD/blob/1.9.3/src/viewport.c...

Window resizing: https://github.com/OpenTTD/OpenTTD/blob/1.9.3/src/video/sdl_...

Zoom: https://github.com/OpenTTD/OpenTTD/blob/1.9.3/src/main_gui.c...

OpenTTD is interesting because it can have multiple "cameras" following objects on the screen. e.g. a viewport can be opened to follow a bus or train, zoomed in, while the main viewport is zoomed out.

Also I'd like to recommend aseprite (https://www.aseprite.org/), which has even cleaner code with zoom / panning / etc. The GUI itself is also pixel art: https://github.com/aseprite/aseprite/blob/v1.2.16.3/src/rend..., https://github.com/aseprite/aseprite/blob/v1.2.16.3/src/app/..., https://github.com/aseprite/aseprite/blob/v1.2.16.3/src/ui/v...

tony··on My FOSS Story
As someone with a footprint in open source, I agree that giving labor for free sets an expectation.

That said, I never had the request to rewrite in a different programming language, yet. Downstream library users as well as package maintainers seem delighted with Python.

I think GitHub sponsors and patreon-like systems can be the way forward. If open source users said "hey, I'll give (10/20/50/whatevers affordable to me now) bucks a month toward open source projects" and then proportion them across projects they choose, that can go forward to things.

But open source is much bigger than projects themselves. One example would be package maintainers on Debian, Ubuntu, Fedora, Arch, BSD port systems, and so on. They put enough time into it they should be compensated.

I think with these new platforms like GH Sponsors, we're on a trajectory toward fixing this.

> I got a drive-by comment effectively telling me to use a “working” license instead, along with some (what felt like) condescending lecture on how licensing works.

I hope my many drive-by github issues on licenses over the years weren't taken as condescending. I want to avoid the headache in the future of a migration, an example of what it can entail: https://github.com/twbs/bootstrap/issues/2054

That's a lot of work.

Worse is the matter of ambiguity with certain licenses. Having something clear and simple that'll work across jurisdictions is a winner.

Wishful thinking or intent doesn't matter when the door is left open for a legal adversary different interpretation of the facts, then having to pay expenses to defend it. That's drama in and of itself, but could also really hurt a business, esp. in early phases.

tony··on Ask HN: What were your most impactful podcast episodes from 2019?
URL: https://www.fighterpilotpodcast.com/

Nice find OP! Would love to find a podcast that covers WW2 battles (e.g. Battle of Midway)

tony··on Ask HN: What were your most impactful podcast episodes from 2019?
Attachment Theory Deep Drive from Psychology in Seattle (Dr Kirk Honda). 15+ hours long, (https://www.youtube.com/watch?v=Ji2QKcKqY7U)

Schema Therapy Deep Dive from Dr Kirk Honda. 3+ hours long (https://player.fm/series/psychology-in-seattle-podcast/schem...)

They are behind a patreon paywall (sorta like how Hardcore History by Dan Carlin is)

If just attachment theory: John Bowlby (https://www.youtube.com/watch?v=3LM0nE81mIE), Ainsworth, Cindy Hazan, Mikulincer, Shaver, Sue Johnson. If you like Bowlby you probably will like Winnicott: https://www.youtube.com/watch?v=ZaZkvvB367I (he influenced Bowlby)

tony··on Scripting tmux
I wrote libtmux (https://libtmux.git-pull.com) as a way to control tmux via python objects.

In the backend, it's all tmux CLI commands.

tmuxp (https://tmuxp.git-pull.com), similar to tmuxinator, uses libtmux under the hood to build workspaces from a yaml/json file: https://github.com/tmux-python/tmuxp/blob/master/tmuxp/works...

Despite that, I've found some people prefer just using plain tmux scripting (https://twitter.com/bitprophet/status/561356905843392514). Aside: That's Jeff Forcier, creator of fabric (http://www.fabfile.org/)

Through tmux's formats (http://man7.org/linux/man-pages/man1/tmux.1.html#FORMATS), you can about any info you'd like on your workspace.

An area I don't know about is -C (control mode). libtmux could technically use it to get live updates rather than inefficiently and possibly needlessly querying session/window/pane info to keep objects up to date. Apparently iterm2's tmux integration uses it.

tony··on Happy Public Domain Day: Gershwin’s “Rhapsody in Blue” Is Copyright Free
I thought today would the public domain day for the Wilhelm-Baynes translation of the Yi Jing (Book of Changes). According to https://fairuse.stanford.edu/overview/public-domain/welcome/, no.

The first edition was published 1950.

I hear two different stories. It's 70 years after date of publishing, other times it's 70 years after date of the last surviving author.

But - the translator Cary F Baynes, died 1977. https://trove.nla.gov.au/work/32102443?q&versionId=38994288

Does that mean Jan 1st, 2048 is the year the book would be public domain?

Aside: Cary F. Baynes was a student of Carl Jung. I didn't know that until now. Jung did a preface to the english translation of Wilhelm's Yi Jing.

tony··on Ask HN: Best books you read in the past decade?
I wrote a book on tmux, if you are interested in getting into the shell more: https://leanpub.com/the-tao-of-tmux/read (free to read online)

While it may not be the most important, if you've been meaning to up your terminal game and want a bit more dexterity when shuffling between panes, tmux and vim are a good area to invest time in [1]

Personality theories:

Textbooks in this area. Affordable on Amazon if you get them used, some are also on kindle but pricey.

An Introduction to Theories of Personality: 7th Edition by Robert B. Ewen is so good.

They can be used as sampler to springboard into areas of psychology you like. The material in this space - normally in paper books - is fantastic. It's totally normal to read through material from 50-70+ years ago.

[1] Not the configuration part, though. That's where the timesink is. Try to be basic as possible with vim configs. `vimtutor` is nice to play with.

tony··on Ask HN: Which project does not have any good open-source alternatives?
- HiDPI support in desktops

Open source makes it hard. Too many choices. Apple and Microsoft have an army and can decide an API from the top down and have an organization put resources into making a consistent experience. Windows 10 and macOS have absolutely beautiful scaling.

On Linux, fractional scaling crashes often. Wayland and Xorg having to handle it separately adds further fragmentation.

PopOS is nice: https://system76.com/pop.

- Mail clients with streamlined UI's:

Geary is as close as you can get to Airmail (macOS) and Mailbird (Windows)

- Window snapping:

Aero snap in Windows, Magnet in macOS. Gnome doesn't want to do quarter scaling, despite it being a common sense request, and the extensions don't like gTile don't use the same behavior at all - so basically it doesn't exist.

(Correction, Gnome seems open to doing it but needs help? https://www.reddit.com/r/gnome/comments/b7f3rl/any_future_pl...)

On the other hand, Linux has amazing:

- PDF readers. Every desktop environment seems to have its own PDF reader that does a better job than any proprietary one. Okular, evince, mupdf, xpdf. Any they're lite. Zero bloat.

- Package management. Every distros package management experience and their stock beats any app store. They don't force you to login.

- Terminals. Kitty is fantastic (https://sw.kovidgoyal.net/kitty/)

- Input: ibus and fcitx

- Access / Installing shared libraries and headers. No need to download xcode or grab Visual C++

- Not open source, but Spotify, Chrome, Slack, Firefox, Steam all work good

tony··on Windows 10 is getting an easier way to update and install drivers
Yes, plain drivers are available: http://www.geforce.com/drivers

That said, Windows 10 driver handling already handles the basic drivers out of the box (at least for me)

Generally though, these manufacturers have their own driver / bios update software that 1.) creates additional background / tray apps 2.) autostarts 3.) offers implicitly to download extra "helpful", "optional" software

Examples of software where all three happens: Fujitsu ScanSnap, Gigabyte Aorus Motherboard, Lenovo Advantage

So now there's a passive, consistent performance loss on the system, a tray icon hogging up space, "helpful" notifications, and unsolicited popups not offering driver updates, but to download additional software (box is already checked)

One nice thing about Linux/BSD desktops is even when Nvidia did proprietary stuff, the most you'd see back in the day is an Nvidia logo when starting X (editing xorg.conf could disable it)

tony··on Ask HN: Why don't more people know about Freenode?
For chat, people will use Slack, Discord or Gitter. These new chat apps have clients on Linux/Mac/Windows and mobile apps and log messages remotely out of the box, where as with IRC, it requires additional setups and the solutions can be porous.

The other thing is IRC is one of those things where instant feedback isn't guaranteed. So many /join, ask a question, and /part by the time I even read it. In those cases, there's StackOverflow (and to a lesser extent reddit), where a thread is created and upvotes help a post weigh upwards a bit longer. As icing on the cake, there's nesting / voting in the conversation, as well.

With IRC, messages fade away and its really a matter of timing you find someone with the right expertise that bites. If you ask something at the wrong hour, you have to hope someone reads far enough up to answer you.

On StackOverflow, people are very generous in pointing to a newer answer with less votes. It's easy to copy and paste code snippets. Posts can be edited. StackOverflow posts are also more persistent as there's a concept of duplication and trying to have one thread for a question.

tony··on Go + Services = One Goliath Project
Thanks for your reply to my reply! Sure, it may take more than two weeks, and maybe golang is a good choice for your stack. Maybe a better way of saying it is python 2/3 compatibility can be gradually adopted while maintaining.

Also, I can't speak for the technical specifics of your project, but I would like to speak a bit from my prior experiences:

> Incompatible changes in some libraries we use

What are those libraries? There may be python2/3 forks available on pypi. For instance, on Peergrade we went from pyPdf -> pyPdf2, boto -> boto3 (that one is a lot of work). We were still able to stick on the python 2 codebase, but gain python 3 forward compatibility.

In the case of very specific packages, we had to do forks. We had to move some patches from a python 2 only library and port them into a python 3 only library, then do one of those version constraint things.

> App Engine first gen to second gen changes (which are for the better, but still a big deal)

I'm not familiar with app engine so can't speak to it.

> the choice of storing some pickles permanently

Can you clarify this?

I can't speak for it without seeing it, but would it be possible to serialize the data to json, use python import strings (https://devel.tech/tips/n/djms3tTe/how-django-uses-deferred-...), then write a migration to port the old pickles over, and have something more portable?

It's possible, depending on what's being stored, it'd also help you migrate to golang if the data stored in it could be consumed by a go service.

> plus a need to really verify unicode handling all over the place (especially in a 10 year old codebase)

Yes I had a lot of pitfalls with this one. Areas to look out for are hashing functions. They are very strict in whether they're dealing with bytes or strings.

Are you already using unicode_literals? Those can be implemented gradually in a current codebase.

How is your test suite? Sometimes having test coverage, even naively, can also act as a smoke test to catch unicode issues.

Selenium tests can get a lot of coverage for very cheap to verify behavior at a high level.

> Moving to Go is more work than moving to Python 3, but in our particular case it's not as much more work as people might expect.

I think the services + golang part is smart, and can't speak for the specifics of your codebase.

I will say in hindsight, I feel the effort / hours I put into upgrading a Python 2 codebase -> 2/3 and eventually 3-only made it much easier to breath. Cleaner syntax, no unicode headaches, and no need to have the lingering prospect of a language exodus looming over the head.

One negative aspect we haven't talked about those with "gradual" python 2/3 migrating is breakages. There are refactors that end up being done that when pushed out risk breaking - and when they're purely internal code changes. There is a business case to eliminate the tech debt because the value equation: A python 2 codebase, even with warts to it, is meeting an EOL in the next few days (https://pythonclock.org/).

Even assuming golang + microservices is the final destination. Amortized, on the projects I've been on, moving to python 2/3 (or 3-only) paid back. If there's opportunities where the python codebase could be split into apps / separate wsgi entry points, then have golang services replace them later - that could be an option. Even without golang, the (probably huge?) refactors involved in moving to python 3 and being "(micro?)service ready" has benefits.

tony··on Go + Services = One Goliath Project
You can start porting your live codebase to python 3 right now - no downtime at all. You can have a 2+3 compatible codebase live in a week or two, it'll get you about 98% the way there [1]

My projects (e.g. https://tmuxp.git-pull.com, https://unihan-etl.git-pull.com) are both python 2/3 compatible.

I learned by reading through other projects like Sphinx, Flask, Werkzeug, and SQLAlchemy:

- Flask: https://github.com/pallets/flask

- Werkzeug: https://github.com/pallets/werkzeug

- Sphinx https://github.com/sphinx-doc/sphinx/tree/v1.8.5 (see compat: https://github.com/sphinx-doc/sphinx/blob/v1.8.5/sphinx/util...)

- https://github.com/sqlalchemy/sqlalchemy

Helpful blog posts: http://lucumr.pocoo.org/2011/1/22/forwards-compatible-python..., http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/

As for automation tools, for 2/3 compatibility, I used futurize and huge codebase to great success: https://python-future.org/futurize.html. I started with this:

    futurize --write --stage1 --unicode-literals --nobackups <files>
and https://docs.python.org/2/library/2to3.html

    2to3-2.7 -w -n <files>
Really helped.

Also, wire Travis / your CI system to have your tests run on python 2 and 3.

If you want to test your python 3 codebase live on a subdomain / same SQL/NoSQL DB, be careful about jobs/tasks! Pickle version mismatches and stuff. Use a separate redis/whatever DB for the deployments.

After you're finally on python 3, you can use https://github.com/asottile/pyupgrade to modern your code.

[1] For the other 2%, use conditionals in your requirements file:

    enum34==1.0.4;python_version<"3"

    ushlex==0.99.1;python_version<"3"
tony··on Ask HN: How do you manage your bookmarks and notes?
Google Chrome Bookmark Manager.

I've also tried:

- Pinboard (favorite)

- Pocket

- Raindrop

Have a lot of bookmarks already and value to your time? You are better off going into Bookmark Manager on Firefox or Chrome/Chromium and organizing there.

I learned that the hard way - none of the bookmark places are good at bulk organizing tagging unfortunately! So if you're getting into a dedicated bookmark service, assume upfront time organizing what you have currently.

Unfortunately - why I ultimately burnt out is none of them - to my knowledge - sync back into chrome bookmarks so I get them in the bar. And they don't integrate / sync with my bookmarks in Chrome automatically. These services end up getting bolted on and treated as second class to the browser's bookmark manager. So they're not bookmarks anymore.

tony··on Show HN: Mandarin Tone Trainer – A ‘Helping Ear’ for Mandarin Pronunciation
Non-native speaker but probably tried 20 times? I had to force it to make it work.

I'm very very sure I can do the first tone.

Would love it if this thing did work reliably though. Also would be nice to have one Cantonese.

tony··on Linux 3.8 introduced unprivileged user namespaces [pdf]
Will this make it easier to run docker without root / sudo?

That could fix the barrier of entry and make docker tutorials passed around more canonical. I would love it if docker "just worked" across machines when testing locally, commands and all.

Even sharing docker in open source projects, there's a learning curve for me where commands in the README won't work. Is it my docker installation? Version differences with docker? Docker compose? Did the container images I'm pulling in change some way?

Do I need sudo or not? I guess with proper group permissions I'm okay - but will the developer(s) I share instructions with have these permissions ready to go?

On StackOverflow: copy/pasting docker CLI (even given proper context fitting into a larger whole) commands and configs probably has a 50% success rate for commands, and maybe 10% if it's a config of some sort (e.g. compose files)

tony··on The Cost of Avoiding Sensitive Questions
Put it this way - on the other hand, there are many sensitive questions that can be inflected by an underlying need to gain approval, avoid disapproval, or their own compliance to appear "good" to the interviewer at the moment.

If it's a political topic, where someone can get lost in the herd so to speak, they can be partisan/intellectualize as a way to mask themselves as an individual. It's cheap and easy. Are we learning about them, or seeing their environment has them scared straight?

I guess with the parental question, there's a motivation to not be candid on that either though. What if the person feels they'd be selfish complaining about their parents or be ridiculed for expressing themselves? If it's a sensitive question, that involves vulnerability of not having feelings validated. If you're hurt by something, and someone scorns you for simply for stating discomfort, that's a pretty difficult situation!

Hm - what would be a valuable question to gather insight on someone, that's open ended, but not invasive? Would there be a way to phrase it so there wouldn't be pressure to give a "good" answer / portray an ideal self-image?

tony··on The Cost of Avoiding Sensitive Questions
I wasn't asked a question.
tony··on The Cost of Avoiding Sensitive Questions
I wonder what would be a more personal (and interesting) question than:

- Describe your relationship with your mother

- Describe your relationship with your father

Completely open-ended, yet, is universal to everyone. Being candid in that area can provide a lot of foundational underpinning to understand someone.

But - would people find it awkward? Would they take offense? Feel pain thinking about the answer?

As for someone's political opinion in a specific area, I'm worried self-presentation pressures and social environment crafts us to more heated (or passive, to not make a stir) for us to conform. In fact, on that subject, Wikipedia's page on this area is amazing: https://en.wikipedia.org/wiki/Conformity

The thing is - isn't the interesting thing someone's true hardships, needs, dreams, interpretations of life events, and desires, rather than something stemming from an idealized image they want to portray others, to be "good"? When social pressures of trying to say things the "right way", it's not a good read. Sure, they may be lashing out at others in outrage. Perhaps its very righteous and personal (most of the time?)

But what if, paradoxically, they're doing it out of pressure to be apart of the herd so they themselves are not ostracized? https://en.wikipedia.org/wiki/Self-monitoring

So I worry that even if we ask sensitive questions, there will be so much splitting, and so many people who are coy on their responses so as to avoid the people who really make a fuss of stuff. Maybe we'd find people are scared to validate their true feelings and needs. What if environment and fear of being an outcast/ridiculed for showing candor has them in a compliance state?

And that'd take us back to psychoanalysts in the 1940's and 50's :) https://en.wikipedia.org/wiki/Karen_Horney#Theory_of_neurosi..., https://en.wikipedia.org/wiki/Character_orientation. It's hard to come up with a new idea in this space.

tony··on Modernist Covers of 1930s Fortune Magazine (2016)
> $1 in 1938 → $18.24 in 2019

https://www.in2013dollars.com/us/inflation/1938?amount=1

> "Despite the Depression, and a cover price of $1 in an era when the Sunday New York Times cost five cents, Fortune was an immediate success. It debuted in February 1930 with 30,000 subscribers and by 1937 it had a circulation of 460,000, with annual profits of half a million dollars..." source: https://www.peterharrington.co.uk/blog/fortune/

Today a copy costs $5.99, or $29.98 a year (source: https://www.magazine.store/fortune/)

tony··on The Mortals Behind China’s ‘God Songs’
The amount of good Chinese music out there is amazing.

If you're open taste-tasting modern Chinese pop music, I would like to recommend:

- A-Lin: https://www.youtube.com/channel/UCURRzgKx4DkVozbOjFflMpg

- Mayday: https://www.youtube.com/channel/UCQyweuVOAh3NHGKDDadRSbg

- JJ Lin: https://www.youtube.com/channel/UCd91HSXKhsIv8PIjNrDByHQ

- Joker Xue: https://www.youtube.com/channel/UCeHAsNPoMw7xfNf0pH-CmJA

They are all on spotify if you look them up too. From Spotify/YouTube you can use related artists/playlists to get into more variety.

tony··on Emotionally focused couple therapy can help love last
I understand the marketing tagline / spin part. To be fair, since it's a theoretical framework, the analogy is done in such a way it's hard to disprove. There's a Barnum effect thing to it. I could keep firing off examples and make it really hard to disprove.

I don't necessarily accept this as science, but as way of analogize complex human behavior without being overwhelmed by variables and contradictions.

A framework will tend to pick what's important and be a way of handling signal:noise.

For example, you could take a more grim framework, like terror management theory will say we're all in fear of death and so society make rules, individuals focus on self-esteem, all to shake off the anxiety mortality gives us. It's hard to disprove that, but that's the point: it posits a core human motivation while willfully ignoring other things to get from Point A -> Point B (example: the motivation of Alexander the Great's military campaigns were to spread his cultural standards/law and ensure forces threatening those rules at home were contained / eliminated. Him naming cities after himself explains the self-esteem motive :P. Napoleon, Emperor Qin, all conquered and placed legal/regulatory systems in their wake)

Back to frameworks in general: It's built off observational anecdotes and if put to the rigors of say - a physics experiment - it'd be hard to give that kind control / certainty. We can't read minds, and various types of reporting methods may not pan out. Our whole lives we're forming object relations that have meanings/associations/intricacies on an individual basis. So to handle things, we pick a common denominator and use that to inspect the situation.

We have to look back into relationships and see conditions / cause / effect, rather than being able to simulate in a controlled setting.

> What about forager societies with loose sexual norms and cultures that did not emphasize monogamy or long-term partner bonding?

Attachment theory tries to be a theory of everything. It'd then be chalked up to difference in culture/customs, rather than the theory not fitting. If a monogamous relationship isn't there, some other bond likely will. Doesn't have to be romantic.

The relations between the hunting group, the teamwork and dynamics of the tribe. It could be argued the cooperation based on trust is what kept it together, so they could survive. It involved letting their guard down at times to trust someone else.

It could also explain betrayals, outcasts and desertion, longstanding protracted hostilities and alliances.

tony··on Emotionally focused couple therapy can help love last
I got the book by the author (Attachment Theory in Practice: Emotionally Focused Therapy (EFT) with Individuals, Couples, and Families by Susan M. Johnson) on kindle but haven't read it yet. I was on a book buying binge a few weeks ago for anything related to attachment theory.

More on EFT: https://en.wikipedia.org/wiki/Emotionally_focused_therapy

Regarding attachment theory itself: A major paper in adult attachment theory is Romantic Love Conceptualized as an Attachment Process, https://pdfs.semanticscholar.org/1d36/ac75d7081fcd86d467f6d2....

For further reading, stuff by Cindy Hazan, Phillip Shaver, Mario Mikulincer is good

Attachment theory originally was focused on early stage development in children by John Bowlby. Later it was expanded as a way to conceptualize relationships beyond the child and caregiver, things like friendships, work colleagues, bandmates, etc.

Examples where modern attachment theory could be used formulate a hypothesis (or analyze if you have more than conjecture):

- why a band breaks up

- why CrunchPad failed (https://techcrunch.com/2009/11/30/crunchpad-end/)

- in interpersonal relations, contradictory, anxious, afraid, erratic behavior - or on the other hand - secure and trusting around someone or a group.

Attachment can explain lasting, functional relationships.

I guess in HN-speak, there could be dyads between startup co-founders, founder <-> employee, investor <-> founder, employee <-> employee. Those cooperational things bubble up into group dynamics and product formation / stuff shipping.

New startup idea: Founder therapy :)

tony··on Ask HN: What book(s) had the most impact for you in 2019?
An Introduction to Theories of Personality by Robert B Ewen

It's a textbook. For a very good overview of Freud, Jung, Adler, Horney, Sullivan, Erickson, Maslow, etc. In each section, it feels like you found a theory of personality you like best, then it gets better. Each time, they recommend further reading. For example, one good one is Our Inner Conflicts: A Constructive Theory of Neurosis by Karen Horney.

Also, Personality Theories: Journeys Into Self by Williard and Patricia Frick is an interesting workbook. You don't have to fill it out, it's helpful read what it's asking and think on it, then also think of those questions when understanding people.

Attachment Theory: Attachment in Adulthood, Second Edition: Structure, Dynamics, and Change by Mario Mikulincer and Phillip R. Shaver. For an easier read, Bad Boyfriends: Using Attachment Theory to Avoid Mr. (or Ms.) Wrong and Make You a Better Partner by Jeb Kinnison is on Audible and Kindle and despite the title is very canon to modern adult attachment theory.

tony··on Ask HN: Why use an SPA?
Downsides first: It's a time sink. By the time you bootstrap webpack, babel, sass, etc. you're often pushed into building an "app" and instead of a web page. So there's a sunk cost just to do something remotely meaningful with react, in practice. The build outputs are colossal, even with tree shaking and codesplitting. The initial build times on a non-trivial app can be minutes. Minutes.

I made some pretty scathing comments about React / SPA apps on HN before. I was insistent I could build an app with django templates + css + js. But in the end I ended up having to use webpack just to build SASS/JS, even if I spurned using a SPA app. So I never found a way to keep it with just jinja/django templates and css and ship a good experience.

If you're making a website that's differentiated enough to be noticed, most likely it'll end up needing the attention to detail a JS app brings. It's just hard to make UX scale without it: template includes are not composable - ES Modules + React components definitely are.

What changed my mind on SPA:

- TypeScript is really the thing that changed the game, because it shores up a very hard-to-scale, disorganized language ecosystem with an amazing type system.

- Webpack and babel getting somewhat stable in their APIs, as well as their extension/plugins

- React Functional Components / Hooks (cleans up a level of indentation and avoids that class cobwebs that can make maintenance a pain)

- Prettier: Excellent formatting tool

- JSX: Ends up making components very "HTML-like" and the formatting with prettier makes it feel like "blocks" where you can get a gist of the depth/hierarchy.

- GraphQL + Relay: The responses are code-generated into types and it automates retrieving data from the server. You can throw redux out. Which leads me to another thing - I consider redux an antipattern on most cases. Not fun at all to work with at scale.

I wish typescript / react / jsx / sass just worked from the browser itself, without all the webpack and babel, and these configuration files. I think maybe, after thousands of hours, I finally comprehend webpack. But in all likelihood I'm mistaken, and webpack 5.x will end up making me have to start over anyway.

tony··on Show HN: Flashcard app to learn the vocabulary of English books/series/movies
Hey! Trying the desktop app.

- Suggestion: On the desktop app, it may be worth detecting `Accept-Language` or origin country for language detection.

- Suggestion: Would love it if it could be test-driven without logging in. After a few cards are done, then an offer to sign up and save progress can be offered.

What did you build it with? Any info on the stack?

Any plan to do a paid version? Import / export of cards?

tony··on The 40% Keyboard
Via right ctrl: On the right side, / is ctrl. Hit / twice to type /.

Holding / on the right side and hitting z gets the equivalent of Ctrl+Z.

← PreviousPage 4 of 8Next →