HNHacker News
TopNewBestAskShowJobs

JNRowe

7,427 karma · joined February 3, 2014

username at gmail.com ; Feel free to get in touch.

[ my public key: https://keybase.io/jnrowe; my proof: https://keybase.io/jnrowe/sigs/orH3nyNqAK4vkIpcxn2HRihHPV2HX80SyDwM9cR5xnw ]

submissionscomments
JNRowe··on Behold z, the unsung jewel that rethinks shell navigation
In which case, I've won!

Seriously though, I think you were probably lucky to have experienced zsh that way. The out of the box experience is incredibly bare. Said as a fellow oh-my-zsh user going back the full twelve years, according to the history of oh-my-zsh's jnrowe theme ;)

I do believe there is a lot of useful knowledge to be gained from working back towards zsh first principles though, especially if -- like me -- you spend hours a day alongside the prompt.

JNRowe··on Behold z, the unsung jewel that rethinks shell navigation
When actually inside vim Tim Pope's excellent vim-projectionist has a wonderfully useful feature for flipping between various related files(:h projectionist-alternate). The whole plugin is really cool, it makes it so simple to configure project specific working environments with it.

https://github.com/tpope/vim-projectionist

JNRowe··on Behold z, the unsung jewel that rethinks shell navigation
Built-in zsh behaviour in fact, oh-my-zsh just enables some extremely useful non-default options.

With a compinit call the directory substring expansion will work. And, with auto_pushd enabled cd fiddles with the directory stack.

The ....... behaviour is interesting because it uses a global alias(alias -g) which is an awesome feature for text expansion anywhere in a line, unlike standard aliases which only expand where commands should be given. It means, for example, you can do `readlink -f ......` and it would perform `readlink ../../../../../..`. Aliases on zsh are very powerful indeed.

I'm writing this text in the hope it drives at least one person to burn an afternoon on the amazing(but huge) zsh documentation, because the entire thing is full of gems.

JNRowe··on Behold z, the unsung jewel that rethinks shell navigation
Not for you, but perhaps for others who also like that behaviour.

With zsh you can enable the auto_pushd option, which makes cd manipulate the directory stack itself. You could probably simply alias cd as pushd too under zsh too, but in bash that would break cd's argument handling.

JNRowe··on Behold z, the unsung jewel that rethinks shell navigation
"CDPATH=<str>" without the export will work as you'd want, and won't pollute the environment for subshells and scripts. It is unlikely you really want to export anything listed in the shell variables section of the man page, but yeah everybody does :/

[This message brought to you by https://news.ycombinator.com/item?id=22978770]

JNRowe··on Command Line Shell for SQLite
I wonder if the simplest "trick" is to do the exact opposite. Name your ~/.sqliterc something else, and then "alias sqlite3='sqlite3 -init ~/.sqliterc-interactive'" in your shell's config?

Although, I'm wondering if using "sqlite3 -init /dev/null" in scripts would be a better idea in general. That way you would guard yourself against some random user's config doing something really weird.

JNRowe··on Command Line Shell for SQLite
I've been really enjoying the litecli experience. Having been a ptpython¹ user I already knew about prompt_toolkit², but somehow had missed litecli.

This comment is just a general recommendation for Python users to have a poke around the GitHub organisation³, as the packages are awesome.

¹ https://pypi.org/project/ptpython/

² https://pypi.org/project/prompt-toolkit/

³ https://github.com/prompt-toolkit

JNRowe··on Munchausen Syndrome by Recruiter
I like Tom Morris' bees repository¹ as an example of recruiter practice, because you can really feel the frustration in the README.

¹ https://github.com/tommorris/bees

JNRowe··on Python Pattern Matching
Oi, you can't leave us hanging like that! I'd really love to read it if you have a link, even more so after the extra paragraph in your HN bio.
JNRowe··on Python Pattern Matching
Last week's discussion on this has over 500 comments, many of which are quite insightful.

https://news.ycombinator.com/item?id=26080760

JNRowe··on Python Package Index (PyPI) Downloads
Until you pointed it out I hadn't realised requests had stopped bundling all its deps¹, but that does make me wonder to what extent bundling distorts the usage statistics. For example, packages such as pip bundle over a dozen packages.

¹ According to HISTORY.md this happened in 2.16.0, and that was released in May 2017.

JNRowe··on What ever happened to scandium bike frames? (2016)
I feel like the increase in wheel width may have had the biggest effect on the tyre shift. It was hard to buy a road wheel that wasn't a 15mm bead width a few years ago, and it is becoming difficult to buy wheels that are not >20mm now. I can realistically choose a 28-622 and run it at 5bar today, that wasn't an option a few years ago. In fact, five years ago my everyday bike didn't even have frame clearance for a 25-622.

There is a different argument to be had if the point is "don't buy frames with road/tri geometry".

I guess my point is: some of us aren't just choosing shiniest shiny, we're choosing an option from the list that only includes shiny.

JNRowe··on What ever happened to scandium bike frames? (2016)
I wonder how much of it is basically a fashion issue? It is increasingly unusual to see new road bikes near me that are basic tubular constructions, to the point it feels like part of the design is simply showing that they're heavily design influenced carbon composite.

Note: I'm personally excluding modern carbon bars here, because I find the lovely sculpted wings far more comfortable when compared to old-style bent tubes :)

JNRowe··on How to Revive a Dead Language
While Nuntii Latini¹ shut down a couple of years ago, their back catalogue is still available². It won't put the new in news, but it is less stale than Latin ;)

¹ https://en.m.wikipedia.org/wiki/Nuntii_Latini

² https://areena.yle.fi/audio/1-1931339

JNRowe··on Alternative Shells
chubot, I have to say I really admire your dedication! I only follow oilshell to the extent that I read your articles and dip in to the wiki, but even that is a joyful learning experience.
JNRowe··on SVG: The Good, the Bad and the Ugly
> You don't edit raw png values either

However, for when you want that there is SNG¹. It can be a surprisingly fun way to perform minor corrections or filters to an image.

¹ http://sng.sourceforge.net/

JNRowe··on Pattern matching accepted for Python
[Expanding my comment from another post on this¹]

Direct links to the PEPs themselves, to perhaps save others a little time. Although the LWN write up linked in TFA is a very nice introduction to the topic and its big discussion in the community.

Accepted:

Specification https://www.python.org/dev/peps/pep-0634/

Motivation and Rationale https://www.python.org/dev/peps/pep-0635/

Tutorial https://www.python.org/dev/peps/pep-0636/

Rejected:

Unused variable syntax https://www.python.org/dev/peps/pep-0640/

Explicit Pattern Syntax for Structural Pattern Matching https://www.python.org/dev/peps/pep-0642/

¹ https://news.ycombinator.com/item?id=26073700

JNRowe··on Python: Acceptance of Pattern Matching – PEP 634
Direct links to the PEPs themselves, to perhaps save others a little time.

Accepted:

Specification https://www.python.org/dev/peps/pep-0634/

Motivation and Rationale https://www.python.org/dev/peps/pep-0635/

Tutorial https://www.python.org/dev/peps/pep-0636/

Rejected:

Unused variable syntax https://www.python.org/dev/peps/pep-0640/

Explicit Pattern Syntax for Structural Pattern Matching https://www.python.org/dev/peps/pep-0642/

JNRowe··on 2020 at OCamlPro
I don't believe I said it was. Let me try again.

My point was that in the places where you may choose to use something else, but are firmly in the ocaml camp, then F# feels like it would be a more natural choice.

JNRowe··on 2020 at OCamlPro
So, I get that there is momentum behind rust but I'm still a little surprised they're hitching themselves to that as opposed to F#.

I'm obviously missing the big picture, but it just feels like if you want ocaml but can't use it¹ then f# may well be a closer fit. That said I'm sure it would be nice to get rust language training from the team at ocamlpro!

¹ For reasons you can't use ocaml I'm thinking about the long road to multicore, and access to a more substantial ecosystem.

JNRowe··on ANSI escape codes (2019)
This is one of the many cool things that zsh comes with out of the box. It ships an autoload-able colors¹ script that does largely the same thing as your fragment, but you know it available wherever zsh is.

In much the same way it comes with both a termcap² and terminfo³ module, allowing you to easily avoid hardcoding system specific escapes in to your config.

¹ https://github.com/zsh-users/zsh/blob/master/Functions/Misc/...

² http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-...

³ http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-...

JNRowe··on Ask HN: What is your “I don't care if this succeeds” project?
While all of these projects are amazing. Yours is the one that made me genuinely smile, thanks for that! There is something so charming and cheerful about creating a niche tool to support a niche tool.

Edit to add: Well documented too, full of surprises :)

JNRowe··on An Archeologist’s Guide to Beer Cans
Also, loved that show although I never really knew why.

In series four, there was an episode in the US¹ that I found quite jarring with the discussion of prehistory finds only a few hundred years old. Obviously, the term has a different meaning given the context, but it still sticks in my mind to this day.

¹ https://en.m.wikipedia.org/wiki/Time_Team_(series_4)

JNRowe··on Sam Coupé Screen$ Converter
Wikipedia link for quirky 30 year old UK computer -- https://en.m.wikipedia.org/wiki/SAM_Coupé
JNRowe··on OO in Python is mostly pointless
For those unfamiliar, the UFCS¹ wikipedia page has an explanation and a few examples.

¹ https://en.m.wikipedia.org/wiki/Uniform_Function_Call_Syntax

JNRowe··on Nq – A simple Unix job queue system
It does support multiple queues. The example you pasted shows how multiple queues work by giving unique queue locations in NQDIR.
JNRowe··on Nq – A simple Unix job queue system
It probably isn't as user friendly as you'd want, but you can reload the playlist by firing commands at a socket. See the "JSON IPC" section in the mpv man page, and specifically the load* commands. jo¹ and socat² are probably the simplest way to use it if you're not looking for heavy scripting.

The scriptability of mpv is really nice if you're the sort of person who likes building your perfect environment, and also a huge pit of addictive time sinks. </warning>

¹ https://github.com/jpmens/jo

² http://www.dest-unreach.org/socat/

JNRowe··on Nq – A simple Unix job queue system
I'll note that nq's author also has a redo implementation¹. Being generally redo curious I've wondered a few times why their other projects(nq/mblaze/etc) don't use redo, but never actually asked.

¹ https://github.com/leahneukirchen/redo-c

JNRowe··on Nq – A simple Unix job queue system
From the man page:

    NQDIR   Directory where lock files/job output resides.
            Each NQDIR can be considered a separate queue.  
Whether or not the default should be $XDG_CACHE_HOME/nq/<something> is a different question. For my own use cases with nq I like the current directory being used, but it would obviously be just as easy for me to set `NQDIR=.`.
JNRowe··on Collapse OS – bootstrap post-collapse technology
There is a nice subplot in After the End - Survival¹ that deals with this. In it a well respected cardiologist finds himself useless post collapse, and is suffering from obvious minor medical problems.

¹ https://www.goodreads.com/book/show/25061009-after-the-end--...

← PreviousPage 14 of 21Next →