Hacker News new | past | comments | ask | show | jobs | submit | joepvd's comments login

awk is amazing. One pattern I often use is:

$ query_something | awk 'generate commands' | sh

For larger programs, I wrote and use ngetopt.awk: https://github.com/joepvd/ngetopt.awk. This is a loadable library for gawk that lets you add option parsing for programs.


This can be a very powerful idiom (basically, code generation at the shell prompt).

It’s well suited to iterative composition of the commands: I’ll write the query/find part, and (with ctrl P) add the awk manipulations, and then pipe to sh.

If it doesn’t have side effects you can pass through “head” before “sh” to check syntax on a subset.


I have had fun with zenity[1] (for use bash scripts) and zenity-inspired libraries like dlgs[2] (if golang is your thing).

[1]: http://manpages.ubuntu.com/manpages/bionic/man1/zenity.1.htm...

[2]: https://github.com/gen2brain/dlgs


To try out a procedure on one dataset amounts to a data point. You need to process a bunch of datasets to establish the performance of the procedure under study.

I though ML folks would have the statistical background to know you cannot infer a true statement from a single occurrence?


> Just see who the US president is.

Think it is time to update Godwin's Law.


Is there a reason why you made the structure of the notes depend on time? Aren't notes that are about the same topic getting very far apart from each other?

I think searching works well when you are as month or maybe three into the project. How does this work like after five years?


Also not GP, but I also have notes per-day.

If you organize by topic, you have to decide which topic to put information in. This means you have to pause and think for 10 seconds about your organization system before writing anything. 10 seconds is enough to lose your train of thought.

If you organize by time, you don't have to decide where to put it. It always goes in "today". You have to pause for 0 seconds.


Yeah makes sense

Maybe an extra advantage is that you are not tempted to rewrite everything all the time, as I am doing with my attempt of topicaly organized notes.

Append-only might really be helpful. Experiment starts now :)


I can confirm, I do this also and posted so elsewhere. But the key is ruthless simplicity. Just a blob of plain text every day and any searchable codes, resist all urges to add formatting, drawings, tables, categories, etc. It's more important to put as few mental obstacles in the way of writing in it as you can, and even if you write a lot every day, it still isn't all that much text, and is pretty easy to manage and search conventionally.


Not GP, but I have kept a 'logbook' file per year for ten years, with similar contents. I'm sure there's a better way than relying on OS X Spotlight to drum up things from five years ago, but it works well enough for me.


I do time-stamping based note taking too using org-capture in emacs, and I also use tags to put my notes in some broad category. Tag auto-completion using counsel package does not need me to remember the exact tag string if it's used previously.


There are different targets for notes in VCS and personal notes. In VerySpecificBug759 you do not want to read about how to get the code to build at all. The context of discovery has a lot of (necessary!) detours, cul-de-sacs, and mis-interpretations.

The context of discovery is often not relevant for the context of fix.


Sounds like you have the possibility to get yourself a new project and have freedom of movement.

Given this liberty, you have two choices: 1. Find/create the most awesome project. Don't care about where. 2. Go to the best town, travel, or whatever, and fix your employment there. Look into remote work.

This is one of the rare moments in life where you are free to choose. Do so wisely.


What do you mean by the best town?


Just skimmed through the README, and I stored it in my list of well-documented projects. Well done!


Thank you!


That is an awesome video. Thanks for sharing!


You have a reference for HTTPS problems with skewed client time?


Not OP, but the obvious issue is that with very large offsets the certificates all look like they've either expired or are future dated; either way they're not accepted. I had a laptop with a dead clock battery for a while; I would sometimes fumble the time when booting it and would discover the mistake when I couldn't load my webmail or Google. (Also, the filesystem would fsck itself because it was marked as last fscked either in the future or the far past, but I didn't always notice that.)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: