Better HN
topnewbestaskshowjobs
Log inSign up

ascorbic

7,690 karma · joined Jan 2, 2013 (13y ago) · 2,088 submissions

Dev tooling at Cloudflare

Astro core team

Ex-Gatsby core team

Submissions

comment 4y ago · link · parent

The US seems to be the only place where everyone uses iMessage, so Android users have to use SMS and suffer the bizarre shaming of the green bubble. In most countries outside the US, WhatsApp seems to be the default. SMS is just legacy 2FA messages, and various other transactional messages like parcel delivery notifications.

comment 4y ago · link · parent

It depends massively on the person. I was vegetarian from birth to age 16, it was during this time that Quorn was launched in the UK. I loved it. It was a lot nicer than the other meat substitutes we had available in the 80s/90s. It was a lot more expensive though, so it was only ever a treat. In retrospect it was probably only a similar price to meat, but we didn't have much money. Conversely my wife has been vegetarian since she was a young child and can't stand any meat substitutes.

753.

Show HN: PHP on Netlify Edge Functions(github.com ↗)

22 points · by ascorbic · 4y ago · 3 comments

comment 4y ago · link · parent

The criteria seem to be mostly designed to ensure that people who aren't using it as their main account can't do things that cost Monzo lots of money. That said, if you want to deal mostly with cash then Monzo probably isn't for you, and I think they're ok with that.

comment 4y ago · link · parent

£4.4 billion in Feb, so about 6bn USD. https://www.statista.com/statistics/1118161/customer-loans-a...

comment 4y ago · link · parent

Ah, memories of carefully copying BASIC from these books. All Usborne books are great (and my kids love the current ones too) but these in particular were such a formative part of my learning to love coding, aged 8-10 or so.

comment 4y ago · link · parent

Vereinigtes Königreich checking in

comment 4y ago · link · parent

That's not something I'd say applies in the UK. Save for large city-centre pubs on Friday night, most are relatively quiet. If it's too loud to have a conversation then someobody is guaranteed to ask them to turn it down. Having a conversation is one of the main reasons to go to the pub. It's pretty much the only place in the UK where it's normal to strike up conversation with a stranger.

comment 4y ago · link · parent

The other part missing from that is that 50 years ago there were almost certainly no women in there. If a wife brought food, she would then leave. It's a world of difference now, where pubs are family places. That's something that's only really happened in the last 20 years or so.

comment 4y ago · link · parent

It's not. I'm not sure where OP got that idea from. The margin is in alcohol in the UK too, in pubs but also in restaurants.

comment 4y ago · link · parent

Take a look at our docs on integrating with Netlify Edge Functions. They're mainly aimed at framework developers. https://docs.netlify.com/netlify-labs/experimental-features/...

comment 4y ago · link · parent

I think they meant "I read up on isolates", rather than "You should read up on isolates"! I think you're exactly right though. Isolates are the way forward, and are gradually going to take more and more use cases from node-based functions.

comment 4y ago · link · parent

Congrats on GA! I'd add to the pros that these edge runtime are a lot more standards-compliant than Node too.

Users do get conufused about the CPU quota thing. They compare the 10ms or so that you get with edge functions, vs 10 seconds on lambda and think it's loads worse, without realising they're comparing apples and oranges. Both Cloudflare and Deno Deploy are limiting CPU time, whereas Lambdas are limited on wall clock time. I've had no trouble keeping long-running Deno Deploy functions running for far longer than a Lambda could run, e.g. when using Server-Sent Events or passing-through a large file download. As long as they're blocking on IO rather than CPU then you're fine. As long as you're not doing something like trying to process images, you're much more likely to hit a 10s lambda timeout than a 10ms CLoudflare or Deno limit.

comment 4y ago · link · parent

(Netlify engineer here) To echo what the others have said, lambdas are a bit smarter than that. They actually keep the node process running until it has been idle for around 5-15 minutes. We can make use of that ourselves by reusing the Next server too. We even cache data locally in the lambda tmpdir (though we do that more for Gatsby). The cold start issue though is one of the reasons that using isolates rather than Node-based functions is so great. Both Cloudflare Workers (used by Vercel) and Deno Deploy (used by Netlify) have extremely fast starts, even when cold.

It's generally just a better fit for this model, which is why I'm so glad to see the approach becoming more popular and am genuinely please that Vercel's offering has gone GA. The more this model of edge computing spreads, the better. More framworks will add support, and it will be a virtuous cycle. The WinterCG work on creating a common standard for these runtimes is also a great project.

comment 4y ago · link · parent

Yes, the open source Next.js doesn't include support for deploying middleware to the edge. If you run `next start` it runs middleware in the main server process. I work at Netlify and to support running Next middleware on edge functions we had to write our own open source integration for it, just as we did for deploying Next to lambda functions.

comment 4y ago · link · parent

That's not what my comment says

comment 4y ago · link · parent

Well I'm not coding all day so closer to 5%, but for anyone earning over $200/month that should be worthwhile.

comment 4y ago · link · parent

You don't run the database itself there, you connect to it remotely. I've not had a chance to try them yet, but PlanetScale Portals look like a great solution there. https://planetscale.com/blog/introducing-planetscale-portals...

comment 4y ago · link · parent

There's Fresh, but you can run also Next.js on Deno (and Remix and SvelteKit and Astro and Hydrogen and Qwik and 11ty and SolidJS and more). We do it at Netlify. See the examples linked here: https://docs.netlify.com/netlify-labs/experimental-features/...

comment 4y ago · link · parent

It's all standards-based code. The WInterCG project makes it even more portable: code should be easy to move between Deno, CLoudflare etc.

comment 4y ago · link · parent

Yeah, I found this confusing at first. But you can even run WebSockets on it for minutes at a time, or piped large files through it taking many seconds. As long as they're not using CPU, they can keep running.

comment 4y ago · link · parent

Which scripting language has a better claim to being universal? JavaScript runs on billions of diverse systems worldwide, both browser, server and CLI.

comment 4y ago · link · parent

Bear in mind this is CPU time, not wall clock time. I work with both AWS Lambda functions and Deno Deploy functions every day. I hit the 10s Lambda timeout all the time (things like slow API calls or network requests), but I never hit the timeout for Deno Deploy. You can even use it for things like Server-Sent Events or Websockets. It'll keep the connection open indefinitely, as long as it's not using the CPU.

comment 4y ago · link · parent

Anyone who has had to maintain a shared PHP server would say that's very different. I used PHP for years, and now use serverless functions (both Lambda and Deno). Serverless means you don't need to worry about anything except the code. It scales automatically. It never needs updating. It doesn't go down in the middle of the night. It can roll back deploys instantly. Sure, you could pay for managed hosting, and then pay more for scaling, and set up automation for deploys, but give me serverless functions any day of the week. They just work.

comment 4y ago · link · parent

That's not a fair reply. One of the main benefits of Deno is that they're using existing standards. It's Node that's the outlier.

comment 4y ago · link · parent

Deno code is really close to browser code. If you have ESM code that runs in the browser and doesn't need access to the DOM then it's a good bet it'll run on Deno, and vice versa. They use web standards for most things, and anything proprietary is put on the Deno global object. For standards that need adapting to work outside the browser, they're working with Cloudflare and others on WinterCG, which is defining a common baseline for these non-browser runtimes.

comment 4y ago · link · parent

Netlify Edge Functions use Deno Deploy, as do Supabase Edge Functions. I'd imagine that's a significant part of their revenue. (I work at Netlify, but have no insight into the financials of this arrangement)

comment 4y ago · link · parent

I've been using the beta since last year and I love it. I think most of the people complaining about it either haven't used it, or are judging it on its most verbose guesses. That's not what I use it for mostly. For me, it's just a really, really good autocomplete. It's best for things with common patterns and APIs. But hey, they're common so I write them a lot. Boring stuff like creating a Response object, adding the right headers and response code. And look, it's worked out that I need a case for a 404 next, and has suggested the code for that to, and a 500 in my catch block. Sure, that's not much typing or cognitive load, but added up over many, many times then it's easily worth it.

And no, I'm not a beginner. I'm a principal with over 20 years experience. I don't really use it for the Stack Overflow-type stuff, but even as an autocomplete it's worth the money. As it happens I'm apparently eligible for free access as an open source maintainer, but I'd pay $100/year in a heartbeat for it. I'd pay for Intellisense if that was $100 too.

comment 4y ago · link · parent

It's more like "we're ok with not hiring people in the Bay Area". The salaries will be competitive in most of the US

comment 4y ago · link · parent

Right, but communication with your co-workers is a vital part of being able to do the job well.
1
252627
70