News for hackers. Stuff that matters.

vtempest

Re:How Hacker News can be improved, 3 things on Friday October 07, 2016 @09:22PM (#12665143)
this site http://hkrnews.com/ allows you to see the article in an iframe so you can read comments and other headlines all on one page -- faster than clicking between tabs. You can also see the top comments easier by collapsing by clicking the icon
>>Trump’s heretical denial of Republican dogma about government incapacity is exactly what we need to move the party — and the country — in a new direction.

It's contradictory for libertarians to be calling for more government spending on the economy. Most of the issues, like crumbling infrastructure, would be better spent not by advocating for effective spending, but rather privatization and letting people vote online on which firm to contract out to various public works paid for by tax money that we vote on how to allocate.

Re:Show HN: Poor man's Google Docs on Tuesday August 30, 2016 @02:47PM (#12392769)
This contributes nothing more than <div contenteditable> and to present this a document editor is counter-productive to users searching for something reliable. The link below shows the many shortcommings of just calling the contenteditable browser API as an emulator. For example, Google Docs does not use contenteditable at all -- for the many reasons outlined below. Building a real doc editor that functions as a widget in blogs and forums sites requires a lot more support -- of the open source alternatives, Medium is one of the best.

Why ContentEditable Is Terrible, Or: How the Medium Editor Works (2014) (medium.com) https://news.ycombinator.com/item?id=11487667

Re:Text Summarization with TensorFlow on Wednesday August 24, 2016 @09:44PM (#12356456)
You're pointing out what's already obvious. You still need some way to find what's "less important", which is what the topic is all about, like by using grammar dependency or keywords infrequency.
Re:Text Summarization with TensorFlow on Wednesday August 24, 2016 @07:51PM (#12356082)
Here's my approach when I built my text-summary app with TensorFlow's SyntaxNet. SyntaxNet (Parsey) gives part-of-speech for each word and a parse tree showing which less-important words/phrases describe higher-level words. "She sells sea shells, down by the sea shore" => (down by the sea shore) is tagged by SyntaxNet as lower describing "sells" so it can be removed from the sentence. Removing adjectives and prepositional phrases gives us simpler sentences easily. Next, we find key words (central to sentences) for news article based on n-grams, and then score key sentences in which they appear. Use MIT ConceptNet for common-sense linking of nouns and most likely relations between them and similar words based on vectors. Generate article summary from the grammatically simple sentences.

My question is how well the trained models interpret human meaning in joined sentences. I discovered that by simplifying sentences you lose the original meaning when that grammatically-low-importance word is central to the meaning. "Clinton may be the historically first nominee, who is a woman, from the Dem or GOP party to win presidency" is way different meaning than that if you remove the "who is a woman". I am also interested in how it makes sence to join-up nouns/entities across sentences. This will cause the wrong meaning unless you are building the human meaning structures like in ConceptNet by learning from the article itself, as opposed to pretrained models based on grammar or word vector in Gigaword.

My work for the future, is using tf–idf style approach for deciding the key words in a sentence, which I would recommend over relative grammar/vectors. In the example in your blog post ("australian wine exports hit record high in september") you left out that it's 52.1 million liters; but if the article went on to mention or relate importance to that number, by comparing it to past records or giving it the price and so on, you can see this "52.1 million liters" phrase in this one sentence has a higher score relative to the collection of all sentences. As opposed to probabilistic word cherry picking based on prior data, this approach will enable you to extract named entities and phrases and build sentences from phrases in any sentence that grammatically refer to it.

Bad programming advice. jQuery uses best practices for many utility functions. Developers should not have to reinvent the wheel or code every basic call from scratch in every project. Don't act like using pre-built common frameworks is somehow a bad idea for ideal programming. They are reliable and faster, its one less issue to worry of what could be wrong.
This isn't good advice. jQuery will get those variables just as fast. You're really splitting hairs just for the sake of criticizing. http://www.stoimen.com/blog/2010/06/19/speed-up-the-jquery-c... Basic developers should not care about such minor differences and write code they can read & maintain. $("") stands out as a DOM element, and who wants to add an extra line for variables -- unneeded and tedious. Most developers should not have to worry "oops did i cache declare everything beforehand" or act as ifs a bad coding practice that 'takes points' in the final code
Re:Ask HN: Share your favourite bash/zsh aliases on Sunday July 12, 2015 @08:59PM (#9875765)
Install useful .bashrc shortcuts: u check updates, l detailed file list, .. parent dir, i [appname] install package, x [file] uncompress file, own [dir] get access to folder, p [procname] find process by name, f [string] find string in this folder's files, gg git commit and push

sed -i "$ a\#custom shortcuts \nx(){ case \$1 in .tar.bz2) tar xjf \$1;; .tar.gz) tar xzf \$1;; .bz2) bunzip2 \$1;; .rar) rar x \$1;; .gz) gunzip \$1;; .tar) tar xf \$1;; .tbz2) tar xjf \$1;; .tgz) tar xzf \$1;; .zip) unzip \$1;; .Z) uncompress \$1;; esac; } \nf(){ grep -R -I \"\$1\" ./*; } \np(){ ps aux | grep \$1 | grep -v grep; } \nown(){ sudo chmod 777 -R \${1:-.} && sudo chown -R \${USER} \${1:-.}; } \nalias u='sudo apt-get update && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y' \nalias l='ls -la' \nalias ..='cd ..' \nalias i='sudo apt-get install -y ' \nalias gg='git add . && git commit -a -m "." && git push -u -f origin master'" ~/.bashrc && source ~/.bashrc

More here https://github.com/gulakov/nodejs-starter/blob/master/README...

Re:Beware the Pretty People on Sunday March 01, 2015 @03:20AM (#9126434)
This article went so many weird places randomly.
I was there! Small world. I would definitely use sandstorm if I wasn't an IT guy.
http://challengepost.com/software/smileforce

ran emotional sentiment analysis from an ipad camera while user scrolled thru menu items. won a prize in salesforce $1 hackathon

Re:Top things to do after setting up EC2 AWS server? on Monday May 19, 2014 @01:02AM (#7765783)
How to backup your code on git:

cd ~/.ssh

ssh-keygen -t rsa -C "[email protected]"

vi ~/.ssh/id_rsa.pub

#copy this into a new key https://github.com/settings/ssh

#now create a new git repo https://github.com/new

cd /var/www

sudo apt-get install git

git init

git add *

git commit -a -m "init"

git remote add origin [email protected]:yourname/repo.com.git

git push -u origin master

Re:Top things to do after setting up EC2 AWS server? on Monday May 19, 2014 @01:02AM (#7765781)
How to backup you web code on git:

cd ~/.ssh ssh-keygen -t rsa -C "[email protected]" vi ~/.ssh/id_rsa.pub #copy this into a new key https://github.com/settings/ssh #now create a new git repo https://github.com/new cd /var/www sudo apt-get install git git init git add * git commit -a -m "init" git remote add origin [email protected]:yourname/repo.com.git git push -u origin master

Re:Top things to do after setting up EC2 AWS server? on Monday May 05, 2014 @11:40PM (#7702721)
The top three things to do after setting up ec2 server is setup a username password login and enable lamp web server as well as to assign a domain name Setup password login

Login to your EC2 via ssh

ssh -i /path/to/your/Awskey.pem [email protected] then set

sudo adduser alex Set a password

sudo visudo Add this line

alex ALL=NOPASSWD:ALL Beneath the root ALL=(ALL):ALL line, and ctrl x to exit and enter y to save

sudo nano /etc/ssh/sshd_config Find this line and modify it to say yes

PasswordAuthentication yes Then exit and save with ctrl+x and press y to save

sudo service ssh restart Now you can login as ssh [email protected]

Setup websites

If you've just booted your ec2 server, you will need to first update packages before you can use them

sudo apt-get update && sudo apt-get upgrade Type y when asked to install.

sudo tasksel install lamp-server Create mysql root passwords when asked

Now open permissions to your root folder

sudo chmod 777 /var/www In order to enable .htaccess on ubuntu server, type

sudo a2enmod rewrite Then type

sudo nano /etc/apache2/sites-enabled/000-default.conf or

Make these modifications, change AllowOverride to All and ErrorLog to use the /var/www root. If you can't find these here, check the /etc/apache2/apache2.conf file

AllowOverride All

ErrorLog /var/www/error.log Ctrl+X and y to save

To install phpmyadmin, type

sudo apt-get install phpmyadmin Then press space to asterisk apache2, tab and enter, then yes and set a password for the phpmyadmin to access the databases. Now accessible at siteip/phpmyadmin

In the AWS EC2 Instance console, make sure the security group assigned to your instance has under the inbound tab port 80 HTTP enabled. Only port 22 is open by default. Find out your security group name listed when you click on your instance, then go to the Security Groups link on the sidebar of ec2 and modify that security group by clicking on it, inbound tab, edit, add rule, select http. Now when you click on your ec2 instance it shows a Public DNS like this ec2-54-85-204-200.compute-1.amazonaws.com, type that into your URL bar and you should be able to see index.html located on /var/www

when you login, if you want the default directory to always be /var/www then type

sudo nano ~/.bashrc And add to the very bottom:

cd /var/www Register a domain

Go to your ec2 manager and click elastic IPs on the sidebar, Allocate a new address, then associate address and select your running instance to be associated with that address. Test it out by typing that ip address into your url box, index.html should show up.

Now go to Route 53 under the aws console dropdown and click Create Hosted Zone, name it your site's name .com, then go to record sets, create record set Type: A with the Value of the Elastic IP you got before.

Now copy the Name Server values, which look like ns-1877.awsdns-42.co.uk. ns-1149.awsdns-15.org. ns-923.awsdns-51.net. ns-216.awsdns-27.com.

Go to godaddy or 1and1 and buy a domain for $10, then under DNS management for that site domain, edit DNS servers to be custom and enter all four of those Name servers. Give it an hour for it to update redirection.

Re:Ask HN: What games do programmers play? on Monday April 21, 2014 @02:38PM (#7622782)
Strategic thinking games like Civ, Starcraft, AoE, Heroes, SimCity...
I've been using this for a while. I wish it had the feature of logging the http requests going on currently, similar to other addons or Wireshark.
Re:Read Hacker News faster on Monday April 14, 2014 @10:47AM (#7586432)
http://hkrnews.com

I made something similar at hkrnews.com but SameOrigin policy blocks 30% of articles. One way to get around it is whateverorigin.com

Re:Optical character recognition web app in JS and HTML5 on Friday March 28, 2014 @07:51PM (#7490728)
Doesn't work very well for me in terms of recognition. I took a picture of a few logos and big text and it only recognized 80%
http://forum.xbmc.org/showthread.php?tid=174736

XBMCtorrent has been doing this already and is open source. runs on all platforms and devices.

Older »