HNHacker News
TopNewBestAskShowJobs

nazri1

1,332 karma · joined December 13, 2010

https://github.com/holygeek/
submissionscomments
nazri1··on A Simple Algorithm That Ants Use to Build Bridges
Great! Now go figure out the algorithm that they use to collectively pull on leaves when building their nest ;)
nazri1··on Ask HN: How to understand the large codebase of an open-source project?
Give this book a go: https://en.m.wikipedia.org/wiki/Code_Reading

I enjoyed reading it many years ago.

nazri1··on Reviving the 1973 Unix Programmer's Manual
I'd like to think that programmers back then most likely "graduated" from using punch cards, hence they have a higher mental guard against typos and mistakes when writing their program (or essays), compared to programmers that grow up with unlimited undo/redo. Back then if you had a typo you'd most likely have to wait overnight, or even days to get the notice so you spend a lot of time proofreading your text, and over time it becomes a second nature to write something right (most of the time).
nazri1··on Documenting the Web together
The thing is it shouldn't be that way in the first place isn't it? Take the golang spec, for example.
nazri1··on Choosing between names and identifiers in URLs

    Those who do not understand UNIX are condemned to reinvent it, poorly. -- Henry Spencer 
Hard links, symlinks and inodes.
nazri1··on SFO near miss might have triggered aviation disaster
Side question: do you think one day commercial pilots aren't necessary anymore, i.e. totally unmanned commercial airlines? If so, how far away in the future are they?
nazri1··on Infinite loop after exit(0)
Fo those who didn't read the linked thread, here's the nugget (answered by Ian Lance Taylor):

  > Why not just panic, though? And why the infinite loop, I wonder?

  The runtime is a special case in many ways, and this is among the more
  special parts.  This loop exists to catch problems while testing new
  ports.  If that loop is ever reached, something has gone badly wrong:
  the exit call should have caused the program to exit.  We can't assume
  that panic is working.  We can't really assume that anything is
  working.  What we want to do is stop the program.  Since exit failed,
  it's possible that a nil dereference will succeed.  If that fails too,
  we still have to do something, so we just loop.  We can't return
  because this is the main function that started the program; there is
  nothing to return to.
nazri1··on Switching to the Mutt Email Client
The thing is an IDE can only do so much - depending solely on the IDE mean your ability to change/refactor the code is limited to exactly what the IDE gives you. If you need to do something that the IDE can't do for you then you're stuck. This is when being competent in Vim/Emacs/Shell is an advantage.
nazri1··on Intel Announces Skylake-X: Bringing 18-Core HCC Silicon to Consumers
90s: CPU Hertz 2000s: RAM Sizes 201xs: CPU Cores?
nazri1··on Ask HN: How do you become productive in a new project as a senior developer?
S
nazri1··on Comparing Elixir and Go
The page (like many other pages nowadays) breaks page down - if I press the page down key I then have to scroll up a few lines because the text are obscured by the always-visible "FREE SIGNUP" banner at the top.
nazri1··on Linux Performance
One thing that I learned from him and have never forgotten is that you can reduce a harddisk (the spindle kind) performance just by screaming at it https://www.youtube.com/watch?v=tDacjrSCeq4
nazri1··on Chrome 55 uses 30% less memory than 54
My laptop has no ssd. This sluggishness brings back memories of linux trashing the swap partition when it ran out of memory back in the early 2000s. Quite understandable since back then most people don't have that much RAM (64Mb?). Nowadays I have 8Gb on my laptop and I run linux with swap disabled. The only disk trashing that I'm having nowadays is due to chrome, and it's definitely not due to swap but the effect is almost the same - at best the laptop is unusable for up to 30 seconds, at worst, I have to do a hard reboot because that's the only way to recover - I can't even switch to a new terminal to kill chrome. Attempts to log in via the tty console (Ctrl+Alt+F2) in order to kill chrome is futile. I could enter the username, but the password prompt took forever to appear. Most of the time it expires after 60 seconds. If I manage to enter the password, the shell prompt can take forever to appear.

Nowadays I do a "killall chrome; sleep 2; killall chrome" whenever it starts to trash the disk and giving me the bad vibe.

nazri1··on Ditching tmux
Checkout keynav, from the same author of xdotool, Jordan Sissel, pretty cool dude.
nazri1··on Stop looking at HN and go work that thing you promised yourself you'd work on
ccache[1] works for me.

http://ccache.samba.org

nazri1··on Whose xterm is it anyway?
On my linux machine I run 8-10 dedicated xterm windows, each runs a tmux session [1]. So the way I would solve this problem for me would be to grep the process' /proc/$pid/env for its unique identifier.

[1] https://github.com/holygeek/wmgr/blob/master/xterms.conf.pl....

nazri1··on Show HN: Fetchpost – Save HN post and comments as mails in maildir format
> It doesn't look like you're using the HN API.

Sorry I don't get what you mean. The comments are fetched by making REST requests to https://hacker-news.firebaseio.com/v0/, so it is using the HN API isn't it?

nazri1··on The 'No True Programmer' Fallacy
> There are even studies on the subject to prove that there are ‘two kinds of people, those that can program and those that can never learn it no matter how much effort they put into it’

If you're referring to the "The Camel has Two Humps" paper then perhaps you'd like to know that the authors retracted their claim: http://www.eis.mdx.ac.uk/staffpages/r_bornat/papers/camel_hu...

nazri1··on Vim Colors
Yup! I'm in the same boat as you - need to switch between light and dark theme due to the switch between outdoor/indoor. I run xterm in openbox, with specific placements (geometry setting) for a specific xterm window session. I ended up writing a script to place the xterm windows exactly where I want them so that I don't have to worry about restarting xterm windows and losing the spatial context. It's a hairy perl script that started life about 8 years ago I think. I have two openbox menu configured to start my xterm windows - one for black and one for white background. It also sets an environment variable there so that vim knows what colorscheme to use when it starts. So everytime I switch between indoor/outdoor I do a ":mksession!|quit", followed by alt+f4 to close the xterm window and then hit the openbox menu to reopen the just closed xterm window with the new background color, and resume my vim session with the color scheme adapted to the current background color. I bet using a modern IDE you can get this done with just one or two keystroke heh.
nazri1··on Ask HN: How do you log application events?
zgrep works for both plain text and gzipped streams so you can do something like this (assuming you have both deflated and non-deflated files that matches the glob pattern):

    zgrep somepattern /var/log/messages*
nazri1··on When Is Cheryl's Birthday?
Bike shedding, layman version.
nazri1··on Ideal Hash Trees (2001) [pdf]
HAMT is cool! I'm maintaining an ORM objects cache server in my $dayjob that uses HAMT as it's core data structure and I really like the ram usage efficiency.
nazri1··on Transpile.js from Facebook/css-layout
It's always a delight reading well-written code. I think this one fits the bill, so I'd like to share it here on HN.
nazri1··on Scientific Breakthrough Lets SnappyCam App Take 20 Full-Res Photos Per Second
Please tell me there's an ipad version in the pipeline. This is the second non-free app I have on my ipad - it doesn't disappoint at all. Great work!
nazri1··on Git koans
Here's how I view the checkout command: It is used to check out stuff from your git database into your working tree. Stuff here means either the whole tree or some files in it. You can check out a whole tree (branch) by specifying its sha1, or you can check out a single file by specifying the tree and the filename. The fact that checkout can be used to create a branch is just a convenience because most of the time it's easier to give the tree sha1 a name to refer to for further git commands.
nazri1··on Mobile Playbook by Google
It's beautiful but I can't stand the page transition animation. It's too slow to the point of annoying - I had to force my eyes to look away from the transition, away from the screen, as otherwise my eyes would try to focus on the blurry moving text which 1) hurts my brain to focus at, 2) disrupts my train of thought as it disturbs my focus (both mentally and physically).

How I wish that tablets provides a way to do the same thing that page up/page down does with just a tap. I found swiping up/down for jumping to the next/previous page distracting for exactly the reason I stated above that I put a bookmarklet on my tablet browser to do the page up/page down when I single tap on a non-html-linkified entity.

nazri1··on The Grammar of Vim
I'd say the best way to learn more about vim if you are already a heavy vim user is to join both the vim-dev and vim users mailing list in google groups. People post questions in the vim user mailing list every day and I've learned many new things just by reading the answer that other people gave.
nazri1··on Visualized Git practices for team: branch, merge, rebase
The merge-often strategy that the OP recommend in his post is the one that is Linus abhors so much. He even calls it "unholy mess" : https://lkml.org/lkml/2012/1/10/267. Basically that merge strategy can produce pointless merges.

See this discussion: http://git.661346.n2.nabble.com/Re-Regulator-updates-for-3-3... on the git developer mailing list for more details on why that merging strategy is not liked.

nazri1··on Git-number: Use numbers for dealing with files in git
At the beginning I implemented it in git itself, in C, but decided that writing it as a plugin as opposed to as a builtin is better as it is the least intrusive method (read: least amount of work).
nazri1··on A few of my Git tricks, tips and workflows
I wrote a tool, git-number[1], that allows me to use numbers when specifying file or directory names to any git operation.

I never have to resort to tab-completion ever since.

[1] https://github.com/holygeek/git-number

← PreviousPage 2 of 3Next →