HNHacker News
TopNewBestAskShowJobs

fphilipe

1,088 karma · joined November 8, 2010

http://phili.pe

https://github.com/fphilipe

[ my public key: https://keybase.io/philipe; my proof: https://keybase.io/philipe/sigs/182uf1x4SUnMvtmLchInbgTL0X0b0qcRGe_g2T0KLDo ]

submissionscomments
fphilipe··on Users may be unable to connect or experiencing degraded performance
Messages within threads are not searchable. Maybe that changed, but until recently that was definitely the case.
fphilipe··on How Ruby on Rails Could Be Much Better (2008)
I've switch from rbenv to chruby[1] years ago. Seems simpler and doesn't have the rehash command that is (was?) required with rbenv. All it does it adjust your PATH.

1: https://github.com/postmodern/chruby

fphilipe··on Sampler for Mac Touchbars
ctrl-[ can also be used as escape (I think escape sends that control sequence in the terminal).

With caps-lock mapped to ctrl, typing it is not too far off from the home-row.

fphilipe··on Git commit accepts several message flags (-m) to allow multiline commits
Skimming the help of a git command once in a while (or when you have that feeling that there must be a way to achieve a specific thing) is rather quick and, thanks the pager's built in search feature, very accessible.

Having an alias for help (and for git) makes this quite convenient:

    $ g h commit
Then search for something in there, e.g. `/stdin<ENTER>`.
fphilipe··on Git commit accepts several message flags (-m) to allow multiline commits
Sure, but how would you format your message so the lines aren't longer than 80 chars? I guess you can edit the command to read from STDIN, but that sounds much more cumbersome than passing -e:

    git commit -F- <<EOF
    Fix issue

    Hello world...
    EOF
fphilipe··on Git commit accepts several message flags (-m) to allow multiline commits
What's cool is that if you start with -m and add a second -m but notice that you have more to say than initially expected, you can still pass -e to open the editor with the message entered so far:

    $ git commit -m "Fix issue" -m "Lorem ipsum..." -e
fphilipe··on Icdiff: Side-by-side highlighted command line diffs
If you're used to Git's diff view and want to use it for any two files outside of a repo, you can do

    $ git diff --no-index file_a file_b
fphilipe··on Elevator.js – A “back to top” button that behaves like a real elevator
I was quite amazed when I found out that not all developer colleagues of mine knew the "Home" button.
fphilipe··on Show HN: Jqview, a simple native GUI for inspecting JSON with jq
Wasn't able to run this yet.

For browsing a JSON file I can also recommend jsonfui. I've been using it for many years now and I'm actually surprised it doesn't have more stars on GitHub.

https://github.com/AdrianSchneider/jsonfui

fphilipe··on On Marketing Haskell
Haven’t written any serious Haskell, but doesn’t Hoogle work for searching infix operators?

One thing I really like about Haskell is Hoogle. The ability to search by function signature is great. I often wish I could do that in other languages.

fphilipe··on ZSH Aliases
No need for an alias, a variable (I think that's what they're called) will do:

    hello=~/Documents
Then:

    cd ~hello/world
Or omitting `cd` (requires `setopt auto_cd`):

    ~hello/world
And with `setopt cdable_vars`:

    hello/word
This also works with tab completion:

    hello/<TAB>
fphilipe··on Write Libraries, Not Frameworks
> so my libraries are called "Frameworks."

Not if you make them static libraries.

fphilipe··on Broot – A new way to see and navigate directory trees
This looks great!

Only dealbreaker for me unfortunately is that it forces me to use up/down arrows, i.e. leave the home row. I use ctrl+p/n everywhere (or ctrl+j/k in some tools), be it in the terminal or on macOS.

fphilipe··on This Page is Designed to Last
I've contemplated upgrading my Pinboard account many times. Finally bit the bullet.
fphilipe··on Poetry – Dependency Management for Python – v1.0
Can you define dependencies loosely and still have a lock file in Anaconda so when you come back to the project a year later you can install the exact same dependencies at the same versions? (Honest question, not familiar with Anaconda.)
fphilipe··on Text QR
qrencode also has a -t argument which accepts a utf8 value. Great way for quickly opening URLs you have in your clipboard on mobile devices during development as you can pipe in your clipboard to qrencode.
fphilipe··on Twitter account deletions on 'pause' after outcry
It has always amazed me how one can be a part time CEO, let alone CEO at two companies simultaneously. How would a board even allow that?
fphilipe··on Dark mode in a website with CSS
Same here: https://phili.pe/

I've used CSS variables though, which make it even simpler. E.g. I have `--page-background-color` and `--text-color-primary` that are set to a certain default value. In dark mode, these variables are set to other values, removing the need to redefine the actual selectors.

fphilipe··on PacVim – PacVim is a game that teaches you vim commands
When I see colleagues using their editor of choice, they’re typically only using the basic features. The pro features that significantly speed up your editing flow remain undiscovered.

When I point out a faster way to accomplish a certain thing that is typically found in all editors, which often even is placed behind the same keyboard shortcut, they’re like “oh, that’s cool, I didn’t know you could do that!”. And that’s without me knowing or having used that specific editor.

So I’d say it’s the people, not vi, as it applies just as well to other editors or IDEs.

fphilipe··on Hub: Use GitHub from the Command Line
Me too, plus `hub merge $PR_URL` in order to merge PRs locally with the same commit message as if I had pressed the "Merge Pull Request" button on GitHub.

I do this in order for the merge commit to be signed.

fphilipe··on Pock: Display macOS Dock in Touch Bar
I have two similar mappings, four finger tap is a middle click (or cmd+click) and four finger click is cmd+shift+click.

That way if I want to open a link in a new tab I can choose between opening it behind the current tab or in front.

fphilipe··on SwiftUI
> it is more likely for Kotlin to work on iOS than Swift on Android.

Who knows... With Chris Lattner at Google and Google adopting Swift for TensorFlow, I could well imagine Swift eventually working on Android (or something newer).

fphilipe··on SwiftUI
Personally, as an iOS developer, this is by far the biggest announcement.

Haven’t had the chance to dig deeper, but the comparison between the UITableViewController and that snippet containing just declarative code looks absolutely promising.

The only downside is that we’ll have to wait one or two years before we can use it if older iOS versions still need to be supported. Let’s hope for extra quick adoption of iOS 13.

fphilipe··on Inheritance versus Composition
Aaron Patterson (aka tenderlove), Ruby and Ruby on Rails contributor, has a good post titled "YAGNI methods are killing me" where he points out the problems when inheriting from builtin classes such as String or Hash.

https://tenderlovemaking.com/2014/06/02/yagni-methods-are-ki...

fphilipe··on Common mistakes in PostgreSQL
I've written about this topic before. Maybe it convinces you that you should (almost) always use timestamptz.

https://phili.pe/posts/timestamps-and-time-zones-in-postgres...

fphilipe··on Common mistakes in PostgreSQL
I've written a post about timestamp vs timestamptz and the only valid reason for timestamp I could come up with is exactly this, scheduling events in the future: https://phili.pe/posts/timestamps-and-time-zones-in-postgres...
fphilipe··on Intermediate Vim
I’ve noticed with a few colleagues when pairing that they were rather slow at typing and made plenty of mistakes. Then I realized that they were not touch typing and always had to look down for the backspace key.

I was quite surprised to see that there are programmers that don’t do touch typing.

fphilipe··on Intermediate Vim
I used Tipp10 about 12 years ago when I forced myself to learn it. What worked for me is to do the basic lessons and then always use touch typing without looking whenever on a keyboard. You’ll be slower initially, but speed will increase over time.

https://www.tipp10.com/en/

fphilipe··on Commit messages guide
> What do you think "to kill you" is?

Infinitive. The predicate is "need" in this case. Swapping the order might make it clearer:

    You need to be exposed to a lethal dose all at once for cyanide to kill you.
fphilipe··on An epidemic of fake influencers and the death of meritocracy
> "how to live your dream by becoming an Instagram Influencer while travelling"

Gosh, imagine how that traveling looks like, documenting every moment of it, creating all these fake, yet real looking spontaneous stories. I doubt that one can actually enjoy traveling like that, but maybe that's just me.

I feel sorry for these people.

← PreviousPage 2 of 6Next →