Hacker Newsnew | past | comments | ask | show | jobs | submit | more phpnode's commentslogin

kysely is an excellent successor to Knex, strongly recommended. Pair it with something like https://github.com/kristiandupont/kanel to generate types from your schema.


> any other compilers that do this?

TypeScript has a notorious "Type instantiation is excessively deep and possibly infinite" warning that can often be unsafely ignored with a `@ts-expect-error` comment


Because otherwise the main thread will be blocked while those operations take place and the whole ui will freeze


You'll find this convention in other JS crypto stuff as well, like libraries for password hashing. Eg:

https://www.npmjs.com/package/@node-rs/argon2

https://www.npmjs.com/package/bcrypt

Though the bcrypt package does provide an additional sync API. (You should be using argon2 though.)


Yes, but you can offer both sync and async methods. Web Crypto only has async.


Programmers who are not aware of the pitfalls will use the sync version and build apps that have terrible ux, so it’s better to not give them the option unless there’s a really good reason to, so what’s the use case here?


You're forced make all of your code async all the way down to lowest crypto calls, even if you handle the async way higher in abstraction layers.


How would you "handle the async" at a different layer? If you were to call sync crypto methods, they'd block the event loop no matter where you call them - unless you call them from a Worker, at which point they're async calls again.

The only real use case would be small scripts where you don't care about sync/async, but experience shows that devs will abuse the sync functions in scenarios where the async ones would be appropriate.


Out of all the type systems which provide safety at both compile time and run time, which are your favourites?


It’s all about tension on the lightning connector imo - the connector isn’t designed for that level of flexibility, so it would break and it’s not like they’re going to use a different connector just for the mouse


This is the best steelmanning I've seen of the Magic Mouse charging port design; I'm surprised I never encountered it before. It actually makes a lot of sense considering how stiff the cables typically are, and it also then makes sense that the (immobile) Magic Keyboard and Magic Trackpad do have a charging port you can use while the device is in use.


It's nonsense -- plenty of people use phones and iPads while tethered to a charging cord. The port is well secured to the logic board of the device because it has to survive a lot of yanking, accidental falls, etc. It doesn't explain the Magic Mouse design.


It's not an issue anymore now that they would use usb-c.


No, jsx is an ergonomic mechanism for describing a hierarchy of deferred function calls


lol no.



> Ohanian is based in Florida, where he lives with his wife, former tennis player Serena Williams

Oh, that Ohanian. It's a small world.


that's likely a backronym


I did a little more digging and it seems you're probably right about that.


I live close to a city with a bunch of gambling companies and yeah, devs at those companies are definitely judged for their choices, similar to people who work for crypto / NFT companies. It has a reputational risk similar to working for porn companies (but less severe).


Exactly. The DJs that are innovative, crate digging, slightly pretentious music nerds are almost exclusively hobbyists, with a vanishingly tiny percentage of them being able to eek out a meagre living from it. The majority of full time DJs cater to mainstream audiences who absolutely do want to hear the same 50 - 100 tracks on rotation every time they go out. They want to dance and sing along to music that they're familiar with, and if the DJ doesn't play what they know then they won't dance, they won't stay, and the DJ won't remain employed.

It's actually very similar to web design - innovation has its place, but 99% of the time people want familiarity.

Source: spent a decade as a professional DJ


A typical DJ is allowed one weird song nobody has heard before. If it is a long show maybe one per hour. The rest better be songs the majority of people know and sign along with.


Yes, ideally played when the dance floor has been full for a while to encourage people to go to the bar and buy another drink.


You might have a bit of confirmation bias based on the particular environments you've been in.

Having taken part in various types of electronic music/art scenes since the early 2000's, I've met all kinds of people. Local hobbyist bedroom producers playing for free. Semi-professional artists juggling gigs&touring with one or more side jobs. Full-time DJ's playing everything from small underground parties to some of the biggest parties/festivals at the time. They all cater to their audience to varying degrees, mainstream or not.

Granted, the scenes I've bumped into tend to be on the non-mainstream side. That's where you can actually go professional being that "innovative, crate digging music nerd" you refer to (removed "slightly pretentious" because that hasn't been my experience). It's tough, but it can be done, and it's a larger group of people than you seem to think.

I've also met some professional DJ's that fully cater to the audience in the way you describe. Many of them make statements like yours like e.g. "99% of the time", "almost exclusively hobbyists", "slightly pretentious", etc. I really don't get why, because it's just not true, and it comes across as a bit defensive or passive-aggressive to be honest.

I mean, of course there is the mainstream audience of the type you describe. But even that audience changes its opinion about which 50-100 tracks they expect you to play on a regular basis. That change has to come from somewhere, otherwise they'd still demand disco tracks from the 70's. That somewhere is the stuff that hasn't gone mainstream yet, and while the percentage of people that can make a living of it is probably not very high, it's a lot higher than what you claim it to be.

That vast overlap between underground/alternative scenes and the mainstream is super interesting, and I'm pretty sure that if you included that part into your statistics, you'd see a different picture.

NB: I might have a bit of confirmation bias based on the particular environments I've been in ;)


> with a vanishingly tiny percentage of them being able to

eke. Yeah, really: https://en.wiktionary.org/wiki/eke_out#English

> out a meagre living from it.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: