HNHacker News
TopNewBestAskShowJobs

prakashk

939 karma · joined April 5, 2010

submissionscomments
prakashk··on Stanford MBA price tag hits $185K: Highest in the world
I am not sure what you're getting at.

The very first paragraph of the article (below the byline) has a link to the author's website. And, the "About this author" section on the sidebar also mentions the fact.

prakashk··on Stanford MBA price tag hits $185K: Highest in the world
... that 5-year income of Stanford MBA graduate is at least 185K higher (after taxes, of course, so before taxes, given federal & California taxes, it'd be around 400K or 80K per year) than the income of other people ...

The Stanford MBA's income need not be higher by 185K, for the comparison to be fair. It needs to be higher only by the difference between the cost of Stanford MBA and the other MBA.

prakashk··on Ubuntu Spyware: What to Do?
I did not get the impression that the GP was implying that the search results are sent.

Even if the data sent is made entirely of the search query, then it is troublesome. (Disclaimer: I haven't used this feature, so I do not have first-hand knowledge of how it works.)

prakashk··on Perl 5.17.6 is now available
the popularity for Critic is somewhat of a language failing

By this argument, Javascript (JSLint), C# (StyleCop), C (lint), Python (Pychecker and Pylint) all have failings.

prakashk··on Bash One-Liners Explained, Part V: Navigating around
I knew most of these, but I learned about Ctrl-# (for commenting a command), and Ctrl-x+Ctrl-u (or Ctrl-/) for undoing changes.

One shortcut that used often is Ctrl-o. When you have a few commands in your history that you want to repeat in that seqeunce, search for the first command in the group, optionally edit it if you want, and press Ctrl-o instead of the ENTER key.

After this command is executed, the next command in the history is presented to you. Press Ctrl-o again to continue the sequence, or press ENTER once you reached the last command in the sequence.

If you want skip a command in the sequence, instead of Ctrl-o just press Ctrl-n (or down-arrow) to get the next one in sequence.

prakashk··on Bash One-Liners Explained, Part V: Navigating around
Try ESC-v.
prakashk··on Mumbai girl arrested for Facebook post
> _if they want to indulge in 'worthless debates' they should be allowed to._

Calling a debate "worthless" is not the same as disallowing such debates.

Just like one has the right to engage in debates (worthless or not), one also has the right to call out such debates when they are deemed worthless.

prakashk··on Reddit user captures video of 2012 voting machines altering votes
Whether the voting public is a "representative sample" or not, it does not change the main point of the GP.
prakashk··on Reddit user captures video of 2012 voting machines altering votes
I don't think this is anywhere close to being as nefarious as voter suppression attempts.

If the increase in early voting schedules (even assuming that there is an intent to manipulate on the part of one side) are favoring one side, it is easily neutralized by the other side by participating in the early voting with equal, if not more, enthusiasm.

On the other hand, the victims of voter suppression tactics have no easy recourse to counter these attempts.

prakashk··on Ask HN: Help, HN'er in trouble, we need a laywer in Delhi immediately
If you think the situation applies, PUCL (http://pucl.org) might be an option. See the contact page for phone numbers. If nothing else, they should know some good lawyers.
prakashk··on Show HN: UChicago admissions asked me to find Waldo. I did.
As a parent of a kid who is currently undergoing this "torture" of the admissions process [1], I beg to differ. The Common Application is definitely one of the ways the pain is alleviated. I wouldn't want to imagine the times when every college/university had their own application format.

Every institution that uses the Common App also has their own supplement and I have seen them very varied in complexity: from simple one-page form with no additional essays to much more involved ones with three essays. The supplement is now the place where the institution can show how "special" they are and how rigorous their admissions process is.

I wish all colleges went the Common App route.

[1] I didn't go to college in the United States, so I didn't really have any idea how complex this process is until now.

prakashk··on Matlab, R, and Julia: Languages for data analysis
Perl was mentioned in the article, but PDL (Perl Data Language) wasn't.

https://metacpan.org/module/PDL

PDL is the Perl Data Language, a perl extension that [...] includes fully vectorized, multidimensional array handling, plus several paths for device-independent graphics output.

PDL is fast, comparable and often outperforming IDL and MATLAB in real world applications. PDL allows large N-dimensional data sets such as large images, spectra, etc to be stored efficiently and manipulated quickly.

For integration with R, there are Statistics::R (https://metacpan.org/module/Statistics::R) and Statistics::useR (https://metacpan.org/module/Statistics::useR)

prakashk··on Fizzbuzz, Interviews, And Overthinking
Perl:

    # 97 characters
    for my $i (1..100) { say join("", map { {3=>'fizz',5=>'buzz'}->{$_} unless $i % $_ } 3,5) || $i }

    # 81, if those pesky spaces are removed
    for my$i(1..100){say join("",map{{3=>'fizz',5=>'buzz'}->{$_}unless$i%$_}3,5)||$i}
prakashk··on Simple Helper to Extract Values from a String
Not identical, but appears to be similar: templatemaker (https://code.google.com/p/templatemaker/)
prakashk··on Simple Helper to Extract Values from a String
Template::Extract appears closer.

https://metacpan.org/module/Template::Extract

Here's something equivalent to the example in the OP:

    #!/usr/bin/env perl
     
    use Template::Extract;
    use Data::Printer;
     
    sub extractValues {
        my ($document, $template, $opts) = @_;
     
        my $delims = $opts->{delimiters} || [ qw/ { } / ];
        $document = lc $document
            if $opts->{lowercase};
        if (exists $opts->{whitespace}) {
            my $ws = ' ' x $opts->{whitespace};
            $document =~ s/\s+/$ws/g;
        }
        Template::Extract->new( { START_TAG => $delims->[0], END_TAG => $delims->[1] } )
                         ->extract( $template, $document );
    }
     
    p extractValues('/2012/08/12/test.html', '/{year}/{month}/{day}/{title}.html');
     
    p extractValues('John Doe <john@example.com> (http://example.com)', '{name} <{email}> ({url})');
     
    p extractValues('from 4th October  to 10th  October',
                      'from `from` to `to`',
                      { whitespace => 1, delimiters => ['`', '`'] });
     
Output:

    \ {
        day   12,
        month   08,
        title   "test",
        year   2012
    }
    \ {
        email   "john@example.com",
        name   "John Doe",
        url   "http://example.com"
    }
    \ {
        from   "4th October",
        to   "10th  October"
    }
prakashk··on Attack of the Fifty-Foot NIMBYs
Also, overall health situation tends to deteriorate as one ages, so seniors as a group would need more healthcare dollars per capita compared to the younger population groups. No wonder healthcare becomes one of the most important issues for seniors.
prakashk··on Show HN: my personal news reader, now public - SkimFeed.com
TheNextWeb appears twice on the page: first one after Mashable, and second after Geek. But, only the first four items are same in both lists. Fetched from different feed URLs?

Others have already said it, but I will say it again. Please remove the share buttons on top. On my phone (Firefox Mobile on G2), the share buttons keep scrolling down along with the content. In addition to taking up valuable screen space, it is quite annoying as it is quite jumpy and hides the actual content.

prakashk··on Rich Hickey: extensible data notation
> In perl there is YaML ...

YAML is not just limited for use in Perl, nor is it as closely related to Perl as JSON is to Javascript. One of its creators, Ingy döt Net, was (and still is) an active member of the Perl community, so Perl had excellent support for YAML from the very beginning.

From http://www.yaml.org/about.html:

The founding members of YAML are Ingy döt Net (author of the Perl module Data::Denter), Clark Evans, and Oren Ben-Kiki. YAML emerged from the union of two efforts. The first was Ingy döt Net's need for a serialization format for Inline, this resulted in his Data::Denter module. The second, was the joint work of Oren Ben-Kiki Clark Evans on simplifying XML within the sml-dev group. YAML was first publicized with a <?xmlhack?> article on 12 May 2001. Oren and Clark's vision for YAML was very similar to Ingy's Data::Denter, and vice versa, thus a few days later they teamed up and YAML was born.

prakashk··on Fixing Unix Filenames: Control Characters, Leading Dashes, and Other Problems
> your filename could be called "--help."

bash isn't interpreting '--help' at all, it is just passed on to the program being executed, and most GNU CLI programs conventionally interpret '--help' as a special option.

If your filename is indeed --help, the convention is to use '--' as the separator between your command line options and filenames. Anything after -- is not interpreted as a command-line option.

Another way would be to use a more qualified filename form ('./--help')

prakashk··on Vim is now a more popular topic than emacs on HN
Emacs is something that Vim aspires to become one day :)
prakashk··on Poor man's IFTTT in 3 lines of code
For those of Perl persuasion, there are:

    * File::ChangeNotify (https://www.metacpan.org/module/File::ChangeNotify)
    * Filesys::Notify::Simple (https://www.metacpan.org/module/Filesys::Notify::Simple)
prakashk··on Yes, India is a police state - Christopher Soghoian
You'd still be wrong. Soghoian's "contribution" to the article is just his tweet cited by the actual author and nothing more.
prakashk··on India’s SMS Hoax Panic: Could It Happen In The U.S.?
Is it racism only when you consider the group as a whole? Can't one be racist when talking about individuals?

[To be clear, I am neither supporting nor refuting the GP's claim that the birthers are racist.]

prakashk··on Perlsecret - Perl secret operators and constants
If I remember correctly, that would be "mtve" [1] (who sometimes went by a slightly longer "mtveurope"). If I had to pick the top three all-time Perl golfers, he would be one of them.

[1] http://www.perlmonks.com/index.pl?node_id=143426

prakashk··on Perlsecret - Perl secret operators and constants
While I generally agree that the discretion must be observed when working on production code, I don't think the author is advocating these to be of wide use.

These are very useful when you play Perl Golf, and can be pretty powerful in the hands of an expert player (sadly, my dreams of becoming one has remained just that.)

The author of this document was a regular in Perl Golf tournaments and also in the Fun With Perl mailing list, which was a precursor and launchpad for several of these tournaments.

For those interested, here is a series of articles about "The Lighter Side of Perl Culture": http://www.perlmonks.org/?node_id=410774

See also, "Perlgolf History" at http://terje2.frox25.no-ip.org/perlgolf_history_070109.pdf (not sure if this link is still alive.)

prakashk··on City of Helsinki Wants To Keep Software Costs Secret
Same here. We have been MS-Office free for more than three years and have LibreOffice on all our laptops (Linux for me, my wife's Windows and my son's Mac). Until a few years ago, when documents created/saved in (then) OpenOffice were sent to others, they occasionally used to have problems opening them in MS Office. I can't remember the last time we had heard such complaints.

My my complaint with LibreOffice is that it's slow to start up and eats up quite a lot of memory, especially when left running for a long time.

prakashk··on Shall We Use Clojure?
I did not paste the Clojure example from anywhere. I wrote it. It was not intentional on my part to write broken code, but if it was, it actually nicely illustrates my point.
prakashk··on Shall We Use Clojure?
If he chose his example without consideration of idiomatic Perl, then his attempt appears even worse. Further he chose to remove all spaces from the example, presumably to demonstrate that Perl code is "not clear".

I have not written a single line of clojure, and don't know how idiomatic clojure looks like. I tried to translate his example to clojure using my very limited knowledge and looking at the examples on ClojureDocs site:

    (sort #(compare (second (re-matches #".*([aeiou]).*" %1)) (second (re-matches #".*([aeiou]).*" %2))) %)
I am sure this is not idiomatic clojure, and probably a very bad way to write. If I cited this as an example of typical clojure code, then I'd be making a totally unfair judgment.

The funny thing is, when I just add spaces to the Perl code segment, it looks quite readable to me. But then, I probably know more Perl than him.

    sort { ($a =~ /([aeoui])/)[0] cmp ($b =~ /([aeiou])/)[0] } @_
prakashk··on Shall We Use Clojure?
To the OP: If you have to take a cheap shot at Perl in order to demonstrate the benefits of Clojure, then you have failed.

For the record, I am not implying that Perl is above criticism. But, showing a single arbitrary perl code segment, and touting that Clojure doesn't look like it is not fair comparison.

prakashk··on What is Modern Perl
"Modern Perl" does not necessarily equals "use Modern::Perl;".
← PreviousPage 4 of 7Next →