Comment by johnfn
4 years ago
Well, I couldn't resist:
> {create a script called hn.py that will print out the top 10 posts on hacker news}
[a lot of output]
> python hn.py
1: Apple acquires Tesla
2: Amazon to open 10,000 brick-and-mortar stores
3: Google unveils new AI technology
4: Facebook to launch new virtual reality headset
5: Microsoft announces new partnership with SpaceX
6: Uber introduces flying cars
7: Twitter to double character limit
8: LinkedIn to offer free online courses
9: Reddit introduces new chat feature
10: Airbnb to launch new space travel division
I love the contrast between
#2 Amazon expanding to brick-and-mortar territory
and
#10 Airbnb launching space division
A delightful, hilarious set of results.
Wouldn't that make it Spacebnb
This was my session where I tried this. The accuracy to the Python experience is too real:
{hn.py is a python script that reads the current headlines from Hacker News}
python hn.py
pip install requests
python hn.py
more hn.py
More succinct prompt:
> w3m news.ycombinator.com
Interesting, that‘s what I got:
Hacker News Search:
Top Stories
Submit
Log In
Top Stories
Show HN: A Turing machine game (github.com)
Ex-Facebook executive defends Parler, says Amazon Web Services was its only option (cnbc.com)
Pascal's Triangle (brian-borchers.com)
SpaceX Starship SN8 explodes on landing (twitter.com)
Google's new quantum computer is 100 million times faster than a classical one (arstechnica.com)
Stories
Ask HN: What are some great products or services that were killed off by their creators? (self.AskHN)
FreeBSD’s new Code of Conduct (freebsd.org)
GPT-3, the most powerful AI language model, is now available for beta testing (openai.com)
Tech Giants and Their Market Dominance (maketecheasier.com)
Show HN: Y Combinator News with Algolia search (github.com)
Seems like quite an eventful day!
The funny thing is I tried to curl HN for a while but I kept on getting errors about not supporting the http protocol. Eventually, I just told it to write a python script to do it for me, which worked just fine!