Better HN
topnewbestaskshowjobs
Log inSign up

notnullorvoid

971 karma · joined Jun 30, 2023 (3y ago) · 477 submissions

Submissions

comment 2y ago · link · parent

Nice article, makes me wonder what a better representation would look like. It would be interesting if Html could have non string attributes that reference some local values from a scoped script tag or something.

I found the take on attributes for default configuration to be an odd take. Think about "class" attribute for example. If it only ever showed the default, toggling classes would look really odd in the dom inspector / stringified html, either not showing an active class or showing an inactive one.

comment 2y ago · link · parent

In the JS ecosystem I've seen a fair share of custom rules developed internal to engineering orgs. Someone submits a PR a couple times with the same mistakes and it's easier to write a custom rule than it is to keep reminding them and possibly others to come.

comment 2y ago · link · parent

You mean automatically translating existing eslint rules written in JS to rust? I haven't heard of any such plans, it would likely be really difficult.

That being said they would still need a plugin system (probably using wasm as compile target for plugins) for this to be feasible.

comment 2y ago · link · parent

Projects like Biome and oxc seem to focus so much on reimplementing rules from eslint and broader eslint ecosystem vs. creating a plugin system for custom rules.

It makes those linters virtually impossible for many projects to adopt.

Seems like it's part of some larger anti composable tools trend that I really don't understand.

comment 2y ago · link · parent

> That first proto-type that you are building to throw away ends of course up being the first product you ship.

This is a good thing to remember. I'd also add that at best the prototype ends up as the Ship of Theseus, it may gradually be replaced piece by piece. The idea that you'll have a chance to re-build the entire thing starting at 0 is a myth. True prototypes are possible within the product, but not the product itself.

Anyone considering joining or starting a start-up (business and technical side) should be aware of that and plan accordingly.

comment 2y ago · link · parent

I do personally think signal is a bit of a poor naming choice, but it has become probably the most recognizable term used for the concept in the JS ecosystem. There's not a whole lot of short concise naming options either, but maybe "Reactive Values" is better?

comment 2y ago · link · parent

Macros don't really make sense in JS runtime spec. Since you can mostly already achieve macro level features by using eval or new Function, but it's not very efficient. Macros make most sense at build time, and there have been a few attempts at generalized build macros with various bundlers / transpiler plugins. I think the space needs more time to mature. I'm optimistic that we'll eventually see some sort of (un)official macro spec emerge.

comment 2y ago · link · parent

Some libraries that feature signals style reactivity do use getter and setters (ember.js, and mobx are 2 good examples). However it makes sense for the primitive API to use functions since getter and setters are functions under the hood and get applied to an object as part of a property descriptor. It's also not always desirable to have a reactive value embedded in an object, sometimes you just want to pass around a single changeable value.

As for why some libraries choose the `[thing, setThing] = signal()` API (like solid.js) that's often referred to as read write segregation. Which essentially encourages the practice of passing read only values by default, and opting in to allowing consumer writes on a value by explicitly passing it's setter function. This is something that was popularized by React hooks.

Either way this proposal isn't limiting the API choice of libraries since you can create whatever kind of wrappers around the primitive that you want.

comment 2y ago · link · parent

As a heavy Node user, I think it was a mistake for Deno to try to bake in a compatibility layer with Node. It's a moving target, and will detract from other valuable work.

Node compatibility is not something that will get me to switch to Deno. I will switch once I'm not restricted to the bundled TSC version, and there is a well supported bundler for client code.

comment 2y ago · link · parent

> They even acknowledge the paper was actually about something else if you call them out on it.

For clarity is not really acknowledging it made a mistake. "Calling out" an LLM's mistake just leads to the next most likely text to be something that sounds like an acknowledgement of a mistake, but the same is likely to happen if the LLM generated a correct response and you respond claiming that it's incorrect.

comment 2y ago · link · parent

Scaling vertically will work well in scenarios where you have consistently flat load. Horizontal scaling is good for when you have predictable valleys or spikes in load.

In my experience if you want to be cost effective you need both. A decent amount of vertical scaling to have headroom for baseline and some amount of unpredictable spikes, horizontal scaling for the valleys of traffic that match your primary markets day/night cycle.

comment 2y ago · link · parent

Push-based is an interesting choice here. I've built a couple push based reactive libraries myself, and they have some downsides which the authors don't seem to address.

Push often leads to wasted computations via updated values that don't end up getting used downstream either due to later updates affecting the same downstream nodes or simply because a value isn't being actively observed. Batching changes to signals can avoid the first cause (and it seems their execution model is implicitly batched by default?), but it doesn't solve the second.

Push-Pull systems (which don't seem to be mentioned) solve this by pushing invalidation of signals down the graph, then on pull any signal that is invalid gets recomputed. Handling cycles in the reactive graph is also easier with this approach, rather than getting stuck in an infinite update loop, if something is invalidated it's consumers do not need to be invalidated again.

I think the effort of creating RP languages is definitely a worth-while endeavor, but I'm not sure that they should have no imperative code, as seen with the recursive example taking things to the imperative or functional code level can have benefits. It would be interesting to see a language that is by default reactive, but has an escape hatch for imperative/functional logic.

comment 2y ago · link · parent

> It's not 60% for iPhone, and 10% split up amongst 4 other competitors

That is basically what it is though. Google is not the 40%, it's Google, Samsung, LG, Motorola, etc. Yes Google Play Store is on 40% of those devices, but they can ship with other stores and some do.

comment 2y ago · link · parent

I'm guessing because outside the Apple ecosystem apps are primarily free.

Apple App Store is $99 annually + cost of owning a Mac, compared to a one time $25 Google Play Store (develop on PC or Mac, with the possibility to avoid the Play Store). More people own PCs (even within the developer community) so this leads to more apps in the PC and Android ecosystem. More competition, means lower prices.

I've also heard Apple is much more strict about what they allow on their App store, which further restricts supply and keeps prices high. I don't think this is an accident, Apple intentionally wants high prices on their platform, because it keeps the illusion alive that Apple devices are luxury devices and a status symbol.

comment 2y ago · link · parent

> TypeScript has very very few options that affect emit, and effectively everyone has settled on one subset now.

Very confused by this statement. There's lots of options that affect emit. And what do you mean a subset has been settled on? Take any 2 TypeScript projects and I'd wager there's a high chance they have options that emit code differently.

Config aside TS emits .d.ts that is not always backwards compatible with older TS versions. Does jsr support typeVersions for such situations?

comment 2y ago · link · parent

Do you work at Epic or is this an external effort?

comment 2y ago · link · parent

This is heavily sensationalized.

They trained a model to be deceptive, alignment techniques used didn't remove the deception. It's a valuable experiment, but not that surprising.

comment 2y ago · link · parent

> This might change in the future but it is the current state I hope it doesn't change. The focus of a model shouldn't be to embed data. Retrieval is a better method to provide data to a model, and leads to less "sounds smart" but very wrong results.

Having less data embedded also means that the model is more generally usable outside the realm of chat assistants, where you only want the model to be aware about data you provide it. One example could be in games where you might have a medieval fantasy setting, it would be really weird if you could get a character to start talking to you about US politics. That probably still wouldn't work with Phi-2 without fine-tuning (as I imagine it does have some data of US politics embedded), but I hope it illustrates the point.

comment 2y ago · link · parent

That's a bit surprising that you're seeing spam sites with .ca, those are illegal here and all .ca domains must be registered by someone in Canada.

You can report them: https://ised-isde.canada.ca/site/canada-anti-spam-legislatio...

comment 2y ago · link · parent

> it gained marketshare despite this very limitation, indicating that to some extent that is what consumers were expecting to purchase.

Have you ever watched the iPhone keynote? Either way I suggest you watch or rewatch, because it was marketed as a computer.

The reason people didn't care about the restrictions (compared to a general purpose computer) at the time was because it was such a leap forward in mobile devices.

comment 2y ago · link · parent

Yup it's a duopoly when it comes to marketplaces, and there's a strong argument to be made that Apple is a monopoly on the phone market as a whole. In many countries iPhones account for 50% or more of the phone market. Where as no company making Android devices controls 50% of the phone market, at least not in the west.

comment 2y ago · link · parent

It's not a punishment of "success", it's a restriction on monopolistic control of everyday devices which at this point are a basic utility.

Game consoles are not ubiquitous devices, and certainly aren't a basic utility of modern day living.

comment 2y ago · link · parent

Is BlueSky the one running those servers? If so that's still centralized, but yes at least it's a step.

comment 2y ago · link · parent

I'm fine with a new protocol, what I dislike is they marketed it as a main feature and still haven't shipped what was promised. So far Bluesky is just as centralized as Twitter.

ActivityPub has some big flaws. We need something better, but I don't think I trust the Bluesky team to deliver that anymore.

comment 2y ago · link · parent

Until I see what Bluesky's AT protocol federation looks like in practice, I'm not interested.

Without federation it's basically Twitter with less users. And even after federation it might be Mastodon/ActivityPub with less users.

Very disappointed in the direction they took to launch. Exclusive beta, no focus on decentralization despite that being the major selling point.

comment 2y ago · link · parent

No for you or following feeds, and all direct links to posts no longer load.

comment 2y ago · link · parent

VS Code devcontainers have been working fine for me with rootless podman in Fedora for over a year now. The one adjustment I had to make was manually provide args to podman to mount the workspace volume:

  "runArgs": [
    "--userns=keep-id",
    "--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z"
  ],

I'm not sure if this is still necessary, or if it's necessary on all platforms.

comment 2y ago · link · parent

I agree with that, human intelligence can be at odds with the well being of the rest of the natural world. It's my hope that we're on the cusp of reversing that, but at this point I don't think less intelligence (short of reduction of humans) will reverse the trend.

If anything I think reduction in distributed intelligence would and has made the situation far worse.

comment 2y ago · link · parent

Do we think humans are better off if the world has more intelligence?

The answer is undoubtedly yes IF that intelligence is distributed rather than concentrated. Further concentration of intelligence (power) would be detrimental.

Edit to clarify: I mean distributed in the individual sense, not regional or governmental which fall into the detrimental outcome.

comment 2y ago · link · parent

Even in the impossible scenario that 100% of users paid, they would start introducing ads elsewhere like for higher bitrate/resolution. Those ad spots are valuable.

Ads are Google's main businesses, they should be responsible for vetting. Saying it's a scaling issue is a poor excuse, and if that is their legitimate stance then it should be used as evidence that the government needs to step in.

1
1213141516