HNHacker News
TopNewBestAskShowJobs

justinnhli

81 karma · joined July 16, 2015

submissionscomments
justinnhli··on Show HN: AI climbing coach – visualize how to climb any route based on your body
I have had a similar idea for the past few years: less an AI model that takes in a photo and generates a video, more a movement planning tool given a 3D model of the wall.

Echoing some of the other comments, I think it would be more interesting to not just see a single avatar climbing the problem, but to see many possible approaches to the same problem, even for climbers with the same body type. This way, even skilled climbers that are stuck on a problem can consider alternate beta/techniques that they may find easier to execute.

justinnhli··on Internet Search Tips
Another option for people who don't have additional mouse buttons is to install addons for mouse gestures, such as Gesturefy [1]. You can then bind undo close tab, next/prev tab, and others to a mouse gesture, allowing you to do those actions without button hunting on the screen.

[1] https://addons.mozilla.org/en-US/firefox/addon/gesturefy/

justinnhli··on Why is it so hard to see code from 5 minutes ago?
Ditto. Unless I have to go back a lot of edits, I don't actually use the plugin that often. I've mapped my undo/redo keys to traverse the undo tree instead of the undo stack:

nnoremap u g-

nnoremap <C-r> g+

It takes a little bit of getting use to, but it takes care of most instance where I need a previous edit from a minute ago.

justinnhli··on Why is it so hard to see code from 5 minutes ago?
> > (3) There is no visual indicator of where you are are in your undo/redo history.

> There might be plugins that somehow present this info in the interface.

The undotree vim plugin [1] does this, and gives both the file at the time as well as a diff of what changed.

[1]: https://github.com/mbbill/undotree

justinnhli··on Python strings are immutable, but only sometimes
> Sometimes I think of Python as the Nash Equilibrium of programming languages

FYI: What you're describing is not a Nash equilibrium, but a Pareto optimal point [1]. They are similar in that you couldn't do any better, but Nash equilibria is in terms of whether this would cause other players to change their strategies, while Pareto optimality is only about trading off different features/dimensions.

[1]: https://en.wikipedia.org/wiki/Pareto_efficiency

justinnhli··on Facebook Indefinitely Suspends Trump
There are more constraints than that - the corresponding words in each phrase are also the same parts of speech, and are often read with a specific cadence. See https://en.wikipedia.org/wiki/Antithetical_couplet
justinnhli··on Teach Debugging (2014)
I teach undergrad CS, and recently wrote this to explain how to debug: http://justinnhli.oxycreates.org/debugging/

It's still a work in progress (I would like to add some worked examples), so any suggestions for improvements are welcome.

justinnhli··on How we learnt to stop worrying and love web scraping
This project was recently submitted to r/python: https://github.com/alirezamika/autoscraper/
justinnhli··on Pure Skill Minesweeper
I prefer the version by Magnus Hovland Hoff [1], which makes the guessing explicit. There is a "Request Help" button that will let you reveal any square you want - but only if there is no other way to progress without guessing (otherwise you lose). This turns Minesweeper into a neat little puzzle game.

[1]: https://magnushoff.com/articles/minesweeper/

justinnhli··on Vim/Neovim Arbitrary Code Execution via Modelines
A different PR is still open, that presumably would include the test: https://github.com/neovim/neovim/pull/10052
justinnhli··on Ask HN: How to organize personal knowledge?
Can you say more about how you use Airtable? To me Airtable has a really appealing low/zero startup cost, but then I'm always tripped up by not being able to do arbitrary queries, joins, etc. to create new views.
justinnhli··on Ask HN: Teaching programming in computational biology?
You might be interested in Harvey Mudd's CS5 Green syllabus [1], which "is designed to give you the foundations of computer science in the context of solving real and important problems in the biological sciences."

[1]: https://www.cs.hmc.edu/twiki/bin/view/CS6/CourseSyllabus

justinnhli··on In interviews with rapists, student pursues not-so-simple question: why?
A list of Madhumita Pandey's publications can be found at https://theconversation.com/profiles/madhumita-pandey-276284
justinnhli··on Maps reveal the structures of ‘Choose Your Own Adventure’ books
These are called call graphs: https://en.wikipedia.org/wiki/Call_graph
justinnhli··on Seven Puzzles You Think You Must Not Have Heard Correctly (2006) [pdf]
Minute Physics [1] did a video on the puzzle [2] and the solution [3].

[1] https://www.youtube.com/user/minutephysics/videos

[2] https://www.youtube.com/watch?v=eivGlBKlK6M

[3] https://www.youtube.com/watch?v=C5-I0bAuEUE

justinnhli··on The Delightful Perversity of Québec's Catholic Swear Words
Here's the clip in question: https://www.youtube.com/watch?v=9U72QVCgh_Q
justinnhli··on Philosophy of science books every computer scientist should read
I want to push on the "alive" issue a bit more. You're absolutely correct in that it doesn't tell us anything more about the virus - but it does tell us more about our definition of "life".

This is in line with the "tree falls in a forest" example as well - the "paradox" is not in whether the tree falls, but whether we would consider it sound. The solution is to be more precise about defining "sound", as either "vibration of air molecules" or "vibration of someone's ear drum". Similarly, the "are viruses alive" question is pushing us for a more precise definition of "alive", which we can then apply to (for example) how we might classify self-sustaining chains of chemical reactions on alien planets.

justinnhli··on Owing Graph Minimization
How is it different? By the definition of equivalent in the article:

> when everyone in either graph pays the amounts they owe everyone else, they end up with the same amounts in the end.

It seems my algorithm also accomplishes that goal. I'm not sure that my algorithm is optimal, but I do think it's a good approximation and is somewhat simpler than the approximation in the article.

justinnhli··on Owing Graph Minimization
I'm confused. The article seems to require that people pay whoever they owe, as opposed to whoever is owed money. It seems we can simply sort the people by the amount owed, then have the person at the top of that list pay the person at the bottom, and repeat until all debt is resolved. This is an nlog(n) algorithm (for the sorting), and creates at most n edges (since, for every transaction, someone either pays back everything they owe, or someone gets paid everything they are owed).

Is there something I'm missing?