News for hackers. Stuff that matters.

midgetjones

Re:Vimium – The Hacker's Browser on Tuesday October 22, 2024 @11:06AM (#41915018)
If you're in a terminal and want to edit just that command (and Vim is your $EDITOR), you can type `ctrl-x ctrl-e` and it will open your command in a buffer. Once you're satisfied, you can `:wq` and the edited command will be ready to execute in your terminal.

Not exactly your usecase, but a useful one nevertheless.

Re:Julia Child's Kitchens on Friday September 20, 2024 @06:48AM (#41600646)
> The genius of this was that Jamie Oliver was of course famous
Re:Show HN: Graphiti – LLM-Powered Temporal Knowledge Graphs on Thursday September 05, 2024 @04:33AM (#41454721)
Hi :) Cool project! Just FYI, there is already a fairly well-established project with that name.

https://www.graphiti.dev

Re:Our Longest Nerve Orchestrates the Mind-Body Connection on Monday September 02, 2024 @06:13AM (#41424131)
Have you tried magnesium? I've found the oil spray applied to the soles of the feet effective.
Re:Ask HN: What apps have you created for your own use? on Thursday December 14, 2023 @07:03AM (#38640460)
That looks great! I'm not sure it was available in 2018 when I looked. I tried a few options, but posting to twitter & subbing to the account was the quickest hack that worked reliably.
Re:Ask HN: What apps have you created for your own use? on Wednesday December 13, 2023 @08:44AM (#38627232)
That's amazing!
Re:Ask HN: What apps have you created for your own use? on Wednesday December 13, 2023 @08:43AM (#38627221)
Absolutely! My original plan had been to scrape their website using Selenium or similar.

I quickly noticed that they had employed lazy loading, which would have made that all but impossible. It took me a good few minutes to realise that if they had lazy loading, there had to be a backend, and I was overjoyed when I found out it was serving JSON.

All in all, it was probably much cheaper for them to have me hitting the API endpoint every minute than scraping the website even once a day

Re:Ask HN: What apps have you created for your own use? on Wednesday December 13, 2023 @08:40AM (#38627162)
Hi! I answered this in the other post, but the Postgres UPSERT was the key. By using a combination of attributes (It may have just been name & D.O.B), In a single operation I could figure out if the cat has been posted (and update the existing row), or create a new row.

This worked as there were only ever 30-50 cats online at one time. If it was a thousand, I'm not sure what I would have done.

Edit: I realise now this was a rhetorical question. Oops!

Re:Ask HN: What apps have you created for your own use? on Wednesday December 13, 2023 @08:36AM (#38627113)
Good question!

The primary reason was to learn Elixir, so this was just a well-timed excuse to explore the language (and Phoenix, the web framework).

The secondary reason was that my wife was the main client, and she doesn't respond well to raw JSON. Each tweet would be just the cat's name, photo, and a link to the website. I also did some filtering as certain cats have safety requirements we couldn't meet, e.g. no neighbouring cats, no children)

One of the main issues I had to figure out early on, was "how do I distinguish which cats are new, compared to the previous response?". This was made harder because I couldn't rely on the ordering; occasionally previously-posted cats would have details updated and they would move position. Postgres UPSERT was new (to me, at least) at the time, and it seemed like a very handy way to offload the responsibility. There were never more than 50 cats listed at any one time, so it was reasonable enough to request all the animals at once, and let the database figure out which cats were new, based on a combination of identifiers that would make them unique. I could also filter the updated records to see _what_ had been updated, e.g. the cat had now been rehomed.

Another thing Elixir did really well was the polling mechanism. It's absolutely trivial to spawn a worker that can repeatedly perform a task and asynchronously hand it off to be processed.

Hope that answers your question!

Re:Ask HN: What apps have you created for your own use? on Wednesday December 13, 2023 @08:23AM (#38626927)
Well played!
Re:Ask HN: What apps have you created for your own use? on Wednesday December 13, 2023 @04:26AM (#38624744)
Thanks! Probably the only side project I've ever seen through to completion
Re:Ask HN: What apps have you created for your own use? on Wednesday December 13, 2023 @04:11AM (#38624628)
A few years ago, my wife and I decided to adopt a rescue cat from battersea.org.uk. However, it was a frustrating experience as the staff didn't always update the website regularly, and we'd find that any suitable cats would be snapped up before we'd even seen them.

I spotted that the website served its data to the frontend via an unsecured internal JSON API, so I built an Elixir app that would poll the API endpoint and upsert the cat data into the database. Any new records would get posted to a twitter account (a free way to get notifications on my phone).

It worked beautifully, and when a black cat called "Fluff" popped up, we both knew he was the right one, and we were able to phone them and arrange a meeting before anyone else. Fast forward five years, and he's sitting next to me on the sofa right now, purring away.

Re:Swift Evolution: Actors on Wednesday March 17, 2021 @05:31AM (#26488557)
The main moral of this story is that people like to claim hindsight for some sort of psychic power.
Re:Flash Animations Live Forever at the Internet Archive on Friday November 20, 2020 @06:46AM (#25159540)
Flash came out in the mid 90s. I'd say there was a decade before they became practical and cheap enough to outnumber desktops
Re:Flash Animations Live Forever at the Internet Archive on Friday November 20, 2020 @04:57AM (#25158954)
For most of Flash's lifespan, laptops and smartphones were not really a thing.
Re:Look ma, no mouse: Vimium on Wednesday October 07, 2020 @05:33AM (#24706576)
I've been using Vim Vixen[0] since the WebExtension switch, and I haven't noticed any missing features. I'd be curious to see how you found it in comparison.

[0] https://github.com/ueokande/vim-vixen

Re:Phoenix LiveDashboard on Friday April 17, 2020 @04:18AM (#22897166)
Gleam is pretty young, so I wouldn't expect the community to be huge.

Not sure what you mean by 'Phoenix on Gleam', but you could write core code in Gleam and use it in an Elixir/Phoenix app, no probs

https://dev.to/contact-stack/mixing-gleam-elixir-3fe3

He did demand royalties, he gets a 40% cut as well.
My least favourite was Quentin Tarantino demanding a songwriting credit for Fun Lovin' Criminals' Scooby Snacks, just because it sampled a few seconds of dialogue from Pulp Fiction.
Re:Suggest HN: No April Fools this year on Thursday March 26, 2020 @05:44AM (#22691946)
The only people that think April Fools jokes are funny are the ones performing them, or PR departments. I have no idea what sort of pizza that would be, but I don't think it's that subjective.

All the people disagreeing with OP in this thread are misreading them as wanting to somehow ban jokes and humour.

Re:Government orders 10k ventilators from Dyson on Thursday March 26, 2020 @05:40AM (#22691915)
Didn't Dyson move all his manufacturing to Singapore at the same time as loudly espousing Brexit?

Waiting for the v2 of the ventilator that has a ball attached, and costs an extra £100.

Re:Suggest HN: No April Fools this year on Thursday March 26, 2020 @05:34AM (#22691882)
I totally agree with your second sentence. Nobody's saying "ban jokes, I hate humour". Just this specific type of joke, at this specific point in time.
Re:Suggest HN: No April Fools this year on Thursday March 26, 2020 @05:23AM (#22691807)
Fair enough, good ones can exist. But every year April 1st becomes such a barrage of PR stunts, mostly not of that quality, that I'd rather companies didn't waste the resource.
Re:Suggest HN: No April Fools this year on Thursday March 26, 2020 @05:16AM (#22691769)
I agree with you, but in agreement with OP, April Fool jokes just aren't funny. They're inherently mean. You can be funny without tricking someone, and everyone is already on an emotional knifepoint at the moment.
Re:How I made a 3D game in 2 KB of JavaScript on Monday March 09, 2020 @06:47AM (#22524350)
Seems to be struggling a bit. Alternate link: https://web.archive.org/web/20200309074327/http://frankforce...
Re:Ask HN: STEM toy for a 3 years old? on Tuesday March 03, 2020 @08:21AM (#22474206)
Don't chase birds for fun
This seems an appropriate time to mention Shobaleader One, Squarepusher's live project, as their stage gear is a sort of Kendo uniform with a full-face LED matrix.

The masks don't look quite as impressive in the video[0], but live it was incredible. The LEDs can react to volume, but additionally they were synced into preprogrammed routines to fit the music, and with very little other light on stage it was mesmerising.

[0] https://www.youtube.com/watch?v=VypU8zojFsY

edit: warning! jazz fusion

Re:The Sounds of New York City, Circa 1920 (2013) on Friday January 24, 2020 @04:31AM (#22136681)
I think that's more a result of recording technology improvements, so it wouldn't have been practical or possible in those days.
Re:Hipmunk Says Goodbye on Wednesday January 15, 2020 @04:38AM (#22052912)
They keep talking about access to data, but not what's happening to the data itself. Is it being deleted? Sold?
Re:Loudness war on Wednesday January 08, 2020 @06:00AM (#21990301)
In my experience, noise-cancelling headphones have made a big difference. The music doesn't need to compete anymore and you can lower the volume and enjoy the dynamic range.

I also wonder if the resurgence of vinyl, and rise of home producers on bandcamp/soundcloud/etc have helped contribute.

Older »