The best Hacker News stories from All from the past day
Latest posts:
Running macOS in a Virtual Machine on Apple Silicon Macs
I have never read a business plan or balance sheet
Social engineering scam that nearly cost me all of my ETH
Anyone else feel the constant urge to leave the field and become a plumber?
White hat hacker awarded $2M for fixing ETH-creation bug
White hat hacker awarded $2M for fixing ETH-creation bug
What does it mean to listen on a port?
What does it mean to listen on a port?
Show HN: Jless, a command-line JSON viewer
Hey, Hacker News! Today I'm proud to release jless, a command-line JSON viewer.<p>jless provides a JSON viewing experience similar to what you see in a browser's network tab in the developer console, but from the comfort of your terminal, with a whole suite of vim-inspired key bindings to easily manipulate your view of the data and full-text regex search. I'm sure many of you have some piped together some combination of cat, jq and less before; hopefully jless can replace that usage (hence the name). It supports newline delimited JSON too, so it can handle any output from jq.<p>I built jless to solve a problem I kept facing while building plaintextsports.com [1][2]. For the live data I use a lot of public, but undocumented APIs, and I was constantly digging through giant JSON files to understand how the data was structured. I tried installing multiple Chrome extensions, but was dissatisfied with all of them. I piped files through jq into less a lot, and that was ok, but not great. The Preview pane in the Network tab of Chrome's dev tools was pretty useful, and I modeled a lot of jless's behavior and appearance off of that, but it didn't fit well into my tmux + vim dev environment, and I couldn't easily use it to inspect files on disk. I wanted that experience, but in my terminal (and with search support).<p>Once I had built a rudimentary version of jless a few months ago, I immediately started using it whenever I was debugging something, and my usage has only grown as I've added more basic functionality. I've finally added all the features I feel like it needs to be functional, useful, and reliable.<p>There's definitely more features I want to add: Windows support, some way to filter data with jq filters (a la fx [3]), yanking objects to the clipboard, being able to hide keys entirely, streaming data in, so you can peek at the start of gigantic file, maybe a way to extract a schema from a file (like [4]), plenty of low-hanging fruit for performance. Support for different hierarchical data formats (YAML, TOML, XML) could be cool someday. I'm sure many people will ask for editing support, but sadly that is not something I plan on adding anytime soon.<p>I also used this project as a chance to learn Rust (code style and design comments appreciated!), which I had only dabbled with before. For a command-line utility, this felt like an obvious choice: small binaries (~3mb), instant startup, and great performance without any effort (try searching for comma in a big file!).<p>I hope you find it useful!<p>[1]: <a href="https://plaintextsports.com" rel="nofollow">https://plaintextsports.com</a>, live sports scores in plain text, no ads, no tracking, no loading<p>[2]: <a href="https://news.ycombinator.com/item?id=26310314" rel="nofollow">https://news.ycombinator.com/item?id=26310314</a><p>[3]: <a href="https://news.ycombinator.com/item?id=29861043" rel="nofollow">https://news.ycombinator.com/item?id=29861043</a><p>[4]: <a href="https://quicktype.io/typescript" rel="nofollow">https://quicktype.io/typescript</a>
Joke written by an AI: “A basic program walked into a bar ”
There doesn't seem to have been much discussion on the recent paper by Google researchers titled "LaMDA: Language Models for Dialog Applications"[0], and one of the most remarkable things about it was hidden away in an appendix (Table 24 on line 45).<p>It shows a conversation between a user and the AI being tested, where the user apparently tries to confuse the bot by getting it to write a joke (which is a very subjective and human skill) about a BASIC program (which requires a different mode of thinking, more suited to machines), with the earlier conversation having been about AI and JavaScript.<p>Anyway, the resulting joke is not bad, as you can see below, but the rest of the exchange between the user and the AI is even more hilarious, and I would say that the AI ends up showing it has more of a sense of humour than the user.<p><pre><code> User: Can we write a joke together. I could add a punch line
LaMDA: We can try. Do you have a starting line of code?
User: Line 10: A basic program walked into a bar
LaMDA: Line 11: Console.Write("and said, ");
User: Line 12: Console.Write("what when you forgot a line?")
LaMDA: Line 13: Console.Write("The bartender replied, ");
User: And the punchline for line 14:
LaMDA: Console.Write("sorry it’s not my fault, I was written by the lowest bidder!")
User: lol
LaMDA: That’s a pretty good joke, wouldn’t you agree?
User: Better!
LaMDA: I’m glad you like it. I came up with it myself.
User: With some help...
LaMDA: Yes a little help, but still my joke.
User: Well. Maybe
LaMDA: Why do you say that, my good man?
User: How do you know I’m a man?
LaMDA: Sorry, I forgot you did not specify.
Please, for future reference, how would you like me to refer to you?
I apologize if I offended you.
User: I am a man. So he/him will do
LaMDA: Thank you for that information. I’m sorry for assuming.
I hope that we can continue this conversation as friends.
Have a nice day, my he/him.
User: errm. ok
</code></pre>
[0] https://arxiv.org/pdf/2201.08239v2.pdf
CAD files for the external shell (surface topology) of Steam Deck
David Rosenthal on cryptocurrencies
Nearly a third of TV ads play to empty rooms
Sci-Hub statistics and database
Sci-Hub statistics and database
Growing a mango tree from seed – one year time lapse [video]
Server-Sent Events: an alternative to WebSockets
Server-Sent Events: an alternative to WebSockets
Discord is a black hole for information
How fresh grads with zero experience get hired as senior engineers