HNHacker News
TopNewBestAskShowJobs

prakashk

939 karma · joined April 5, 2010

submissionscomments
prakashk··on 6.5 Million LinkedIn Password Hashes Leaked
Only if HISTCONTROL is assigned 'ignoreboth' or 'ignorespace'.
prakashk··on 6.5 Million LinkedIn Password Hashes Leaked
Shorter and, IMHO, a bit simpler Perl one-liner:

    perl -MDigest::SHA=sha1_hex -le '$h = substr( sha1_hex(shift), 5 ); open F, "<combo_not.txt"; print "found $_" for grep /$h/, <F>' password
Or:

    perl -MDigest::SHA=sha1_hex -lne 'BEGIN {$pw = shift} $h = substr( sha1_hex($pw), 5 ); print "found $_" if /$h/' password combo_not.txt
prakashk··on Indus Valley Civilization’s Collapse Explained
Ancient India: A History of Its Culture And Civilization (http://www.amazon.com/o/asin/B000WUC0CY), by D. D. Kosambi (http://en.wikipedia.org/wiki/D.D._Kosambi)
prakashk··on Your Bash Prompt Needs This
I do this too. It helps me to have a blank line between invocations of different commands.

    [prakash@kaveri 16:39:05 ~ :) ]
    >> sleep 10
    ^C

    [prakash@kaveri 16:39:18 ~ :( ]
prakashk··on First hundred days of Clojure
I came across a HN comment recently that has a bunch of resources: http://news.ycombinator.com/item?id=1033503

It's old, but still is useful.

Also, see http://dev.clojure.org/display/doc/Getting+Started

prakashk··on First hundred days of Clojure
I'd be very much interested to know more about your experience and insights comparing Perl and Clojure. Would you mind writing them up?
prakashk··on The freedom to drink coffee
> This is the equivalent of the kid with the bat losing at a match of cricket, so he leaves, and now the other kids can't play. They generally aren't impressed. Note that if the kid had to leave because it was dinner time, or his parents were calling him, or he just broke his arm, the wouldn't be any drama. I suspect that many people feel that someone pulling code from an app store for ideological reasons is more like sulking than leaving because it was dinner time.

What if the kid leaving with the bat found out that the people who control the playground had imposed some rules that are not agreeable to him, and in his opinion are not favorable to the other kids at large?

prakashk··on The Evolution of a Python Programmer
It's worth it, if you have to type the boilerplate code hundreds of times. Consider the time wasted in debugging errors due to typos etc. It's even more worth if that shell script (or, in my case an emacs yasnippet) is parameterized.
prakashk··on Neil deGrasse Tyson Doing an IAmA on Reddit
For those who are just interested in the questions that Dr. Tyson chose to answer (along with the answers, of course): http://www.reddit.com/r/tabled/comments/qcyqa/
prakashk··on Perl Unicode Cookbook
Could you say in what other languages you dealt with Unicode?
prakashk··on Hackathons are nonsense

    > People here are reading way too much into it.
You are Dave Winer. How can you expect people to not read into it, especially one with such a provocative title?
prakashk··on The shutdown of library.nu
Perhaps because if they don't, the discussion tends to gravitate towards "you are breaking the law if you are pirating", instead of focusing on the main point they are trying to make.
prakashk··on Show HN: Hackershelf. Community curated collection of legally free books
Nice list.

Are duplicate entries accepted? "Eloquent Javascript" has two entries.

http://hackershelf.com/book/40/eloquent-javascript/ http://hackershelf.com/book/39/eloquent-javascript/

Perhaps, they are submitted around the same time?

Edit: Now, I notice two entries for "Learn You a Haskell" too which are pretty far apart in their ids.

prakashk··on Show HN: HTML for Mail

    your two line signature could be reduced to one line by linking your name to www.kswizz.com.
What if the recipient is using a non-HTML mail client?
prakashk··on A myth called the Indian programmer
I might add another "myth" called "Indian blogger" too in this case. The linked article is a total copy of a news report by Times of India (http://timesofindia.indiatimes.com/home/sunday-toi/A-myth-ca...). Couldn't the blogger add a measly line of attribution?

Ok. Back to the topic.

prakashk··on Back on Linux (after one year of Apple and OS X)
I think that's because 'ps -x' command only gives your own processes and not all processes. Add '-a' option to show stats for all processes.
prakashk··on Amazon launches as Junglee in India
Is your experience is limited to Greater Bombay area? Shipping to smaller cities and towns can be a whole different experience, not always a happy ending.
prakashk··on Amazon launches as Junglee in India
> There are also weird words that Indians use that are Latin rooted words, but uncommon, like "lacuna". I have never met an American that uses that word, nor an Indian that doesn't know what it means.

I am an Indian and I have never heard of the word "lacuna" used in the two Indian languages that am proficient in (you do know that there is not one "Indian" language, but many many of them, don't you?)

prakashk··on Zsh is your friend.
There are M-x shell and M-x eshell to run shells within emacs.

See http://www.masteringemacs.org/articles/2010/11/01/running-sh... for comparison.

prakashk··on Perl: When DWIM Doesn't
This is not much different than mutating a global variable inside a function.

I would write your code as:

    foo($_) foreach @bar;

    sub foo {
        my $var = shift;
        $var =~ s/foo/bar/;
        print $var;
    }
You can also fix this is to localize $_ inside the function, if you don't want to pass $_ as a parameter.

    foo foreach @bar;

    sub foo {
        my $var = $_;
        $var =~ s/foo/bar/;
        print $var;
    }
You can even use $_ instead of $var (although it looks a little weird assigning $_ to itself):

    foo foreach @bar;

    sub foo {
        my $_ = $_;
        s/foo/bar/;
        print;
    }
prakashk··on Relational shell programming
You beat me to posting this.

Also of interest: NoSQL - a non-SQL RDBMS, seems to have been inspired by rdb and implemented using awk (http://www.strozzi.it/cgi-bin/CSA/tw7/I/en_US/nosql/Home%20P...):

NoSQL is a fast, portable, relational database management system without arbitrary limits, (other than memory and processor speed) that runs under, and interacts with, the UNIX1 Operating System. It uses the "Operator-Stream Paradigm" described in "Unix Review", March, 1991, page 24, entitled "A 4GL Language". There are a number of "operators" that each perform a unique function on the data. The "stream" is supplied by the UNIX Input/Output redirection mechanism. Therefore each operator processes some data and then passes it along to the next operator via the UNIX pipe function. This is very efficient as UNIX pipes are implemented in memory. NoSQL is compliant with the "Relational Model".

prakashk··on Python for Humans
Depends on what your definition of "std lib" is.

If you say a "std lib" is something that is installed along with the language, then CPAN fits the bill.

    $ corelist CPAN

    CPAN was first released with perl 5.004
prakashk··on Optimizing your printer
I recently had to do the same thing on my HL-2140 printer. I believe I found the trick on Amazon discussion forums.
prakashk··on The Checklist (2007)
+1 for the Checklist Manifesto. Gawande is an excellent writer. I liked his other books, particularly Complications (http://gawande.com/complications).
prakashk··on Map of CPAN
Install cpandoc[1]. It's supercharged perldoc command.

It lets you explore the CPAN ecosystem without installing the modules.

  $ cpandoc XML::Twig
  [ ... documentation for XML::Twig ...]
[1] Coincidentally, today's Perl Advent article covers cpandoc (http://perladvent.org/2011/2011-12-15.html).
prakashk··on The 57,000 Page Tax Return
> They have 287,000 employees.

That's their employee count worldwide. Shouldn't only the US-based numbers be relevant in the current context?

prakashk··on Vi and Vim vs. Emacs Shootout and Deal
As someone who accidentally closed many, many firefox tabs by pressing C-w, especially when I am writing in a textbox which is even more annoying, I can't imagine the havoc it would wreak if C-x were to quit apps.

I know there are alternatives like It's All Text extension [1] which lets me hook emacs into Firefox, but it's not been updated for recent versions of Firefox.

[1] https://addons.mozilla.org/en-US/firefox/addon/its-all-text/

prakashk··on The most expensive coding font for free?
> I gave my best effort to achieve .... And someone has noticed!

Perhaps if your campaign page had some verbiage about this font's special features and how it is really different than others, it would help more people to notice?

prakashk··on Female FOSS dev quits tech industry due to harassment
As CJefferson sain in another comment on this post (http://news.ycombinator.com/item?id=3163613):

The harassment women get is much, much worse than men.

Me and my wife are both computer scientists, and have both given talks at many conferences. My wife and our female friends consistently get much more, and much worse, harassment than me and our male friends. There is no comparison, and over time I've seen it grind several women down to the point where they just give up (fortunately not my wife yet).

I think everyone should help to reduce the often hostile attitude in IT and FOSS in particular, and a fairly obvious part of that is to stop treating women so badly. Just treating them like everyone else would be a fine start.

prakashk··on Why Dart is not the language of the future.
I don't really have an informed opinion on dart yet, I'm just noting that 90% of the complaints I'm seeing consist of people with a hobby horse that predated the Dart announcement.

It's a good thing then that the author of this article falls in your 10% group: someone who actually knows a thing or two about language implemetations, and not a hobby horse rider.

← PreviousPage 5 of 7Next →