Thanks for the factual clarification. This is so important when everyone already has their trigger finger on politics. Not meaning that politics are irrelevant here, see sister comment by jobim.
But it's impossible to form a nuanced opinion when political association has a higher priority than the facts; which, again, don't look flattering for the implementers.
I wanted to try out Erlang + Elixir since forever, do you think Phoenix LiveView would be a good starting point? For example, to create something like a simple game with modest persistence and only very limited RT-features? I was thinking about sth like a quiz app, not a web MMORPG of course :)
Or is LiveView only useful to optimize partial page reloads and SEO?
Thanks a lot! I'll give this a try next time I feel like coding for a hobby.
I've tried exactly this "project idea" in a half-assed way some time ago with next.js, Postgres and Prisma before I was out of free-time-in-front-of-computer.
Then abandoned it again it when I started coding for a living again. It was exactly the "modest RT capabilities" thing when I abandoned it. Because I started using Firebase (2023, Supabase was not known to me then) and then I felt like "OK, I managed to get full next.js running properly on shared hosting with limited server-side JS, but now I again need an external cloud provider for a hobby project" (Firebase).
I read a bit about their pricing models and lost interest.
I think next time I'm gonna try see what this stack can do.
In 2024, I heard a very interesting conference presentation about Erlang and its concurrency model, that was after the hobby experiment, and made me want to revisit losely functional languages with strong pattern matching (OCaml too, but that's a different topic).
Not the parent, but: ChromeOS isn't what I'd call a web-based OS. It supports Android apps, and that's how you get a lot of things that don't have web versions. Not much different from how Ubuntu can run Chrome and also supports native apps.
Personally, I dont consider chromeos wheb thinking about operating systems because it's not a real os, its a toy released by a shady advertising company. (Same as android.)
You probably meant [object Object] :) Since arrays have their own default toString implementation (its own can of worms that is the basis for JSFuck[0]), you'd have to go out of your way with Object.prototype.toString.call to get [object Array]
[0]: https://jsfuck.com/ relies on Array#toString for casting values to strings
I intentionally corrected it, because vanilla JS arrays used to behave like this in some contexts, but I'm not even sure about which ones still.
Since the "Array" is a reference to the prototype, I think it might be outdated due to changes in undefined behavior of runtimes when serializing array objects, or logging them.
I'm pretty sure that [object Array] used to be the result of logging an array at some point.
Object.prototype.toString
always returns the result of
Array.prototype.join
per spec, afaik, so for an empty array it's the empty string.
> Arrays are exotic objects that give special treatment to a certain class of property names. See 10.4.2 for a definition of this special treatment.
I just meant these special properties. The behavior, apart from the square-bracket syntax for construction, can be emulated using Object property descriptors, Symbol.iterator etc, but AFAIK, much of this is retro-fitted.
Not disagreeing with the fact that arrays are almost just regular objects in JS, but the "just" in "just objects" does have nuances, AFAIK.
JIT Optimizations for non-sparse arrays might just be part of a larger hot-path optimization system, but I think there are still differences.
Is it possible to create an object for which
Array.isArray
returns true without it being instantiated using an array constructor or other array-returning function, the Array prototype, or square-bracket syntax?
I do it this way, but this led to people asking me in reviews why I use NULL^^
My explanation was that it signals intent to me, and is different from some property not being part of the expected object shape or not having been initialized because of some accident or logic failure.
Since then, I've sticked to it, and am "allowed" to use NULL ^^
It can lead to some annoying checks in TS for primitively-typed properties, so for these, I still allow explicit usage of undefined when it's simpler given the surrounding code.
But I agree with you in principle. Using "undefined" as a "second nullish value" and explicitly checking for it is a programming error.
When there's object/areay vs null/undefined, thankfully, the truthiness narrowing often allows me to interface with code relying on "undefined" without explicitly handling this "value" in my own parts of the code base :)
In general the language uses `null` if it would otherwise return an object (similar to Java; this is also why null is an object but not really in both languages), while `undefined` is used if it could otherwise return any value.
Could the language have done without both null and undefined? Definitely. But it's here and here to stay.
Though, it's not the only language with two nulls. Julia has nothing and missing, though their semantics are more well defined and with different behaviors than in JavaScript.
If you're a type purist then undefined looks nicer... It'd be like being upset at booleans because things get coerced to them or some 'ish.
No: it's the type that has one inhabitant—it's not that type's fault that it appears as a default argument or var or was left out of JSON... So long as typeof null === "object", null is the absurd one
undefined is not less absurd because there are parts of the standard that allow you to differentiate between
undefined
and a non-initialized value.
Of course you shouldn't do that, but I once encountered a library that behaved differently depending on whether an option in an options bag object was not present or explicitly set to undefined.
You can run into similar ugliness with function parameters, if you do evil things like using
arguments
And of course you can explicitly check keys of objects, including parameters that are going to be destructured.
All not things you should do, but taints the "purity" argument, doesn't it? :D
It's a refusal to engage with the reported information, not an argument.
Note that the general sentiment on HN when it comes to other topics is that every slight simplification in reporting on science is unforgivable, Gell-Mann-amnesia-effect, bla bla...
For example, it is clickbait to say "cancer" instead of "some types of cancer which we further need to specify" in headline.
But it is of course impossible to take scientists seriously when their results are reported as "they observed X, and are there are indications that it could mean Y".
Who says "could"? It's way too risky to engage with people who don't tell me exactly what to think!
To be fair, implementing something like the Spotify client does require a web app, not "just" a web site.
But even document rendering with light scripting is not trivial so yeah, the required browser is the bottleneck.
I always wonder (layman question): couldn't native Electron apps (and similar technologies) save a great deal of RAM by using the same sandboxing model for apps that browsers use for tabs, instead of fully-fledged instances?
Was that an idea that Tauri also tries to implement, or am I remembering this wrongly?
Regarding the "joke on the web", there's plenty of HN threads about Flutter where you will see this sentiment, not only about performance, also about UX (e.g. text rendering, selection, scrolling...).
I'm not sure if the web render engine has gotten better since then, and am too lazy to look up the links rn, but threads should be easy to find using HN search.
Still seems like a common source language + GUI toolkit that targets the web platform and various native platforms (mainly Android, iOS, macOS, Windows, and desktop Linux of course) without significant overhead has not been achieved yet. And it's questionable whether it's possible, given the special requirements (and capabilities) of the web platform and the different native platform.
Dioxus Native supports both web and native platforms because they serve HTML and CSS for the web and then on native they turn that into canvas rendered code just like Flutter, not a webview, because they built their own HTML and CSS renderer.
For Flutter web, yes as it's canvas based it doesn't have all the same web features but generally for crud apps it doesn't much matter, especially if it's near zero effort taking your Flutter mobile and desktop app and putting it on the web. With the new impeller renderer and Wasm improvements it has gotten quite faster too.
Writing about AI, destroying the planet for data centers, there's a lot of money to be made.
That being said, AI seems kind of miraculous sometimes.
Similar to cars. So enticing that we make everything else in the world worse in order to maximize the profit, make it indispensable, subsidize it, and make the dependency on it irreversible.
And it's not even something to blame individual people for.
Driving away from all the other cars to spend a weekend feels like freedom.
Using AI to answer a question feels like a "bicycle for the mind".
But in fact it's more like a car. It requires massive resources and creates perverse incentives, and the result is ineffective and corrupt.
Both cars and AI are amazing technology and extremely useful, but using them is not an individual responsibility. It requires societal subsidy.
The environmental impact of answering a question on an obscure topic with ai model is less than an the impact of answering the question with an hour-long google search hunting for references or a drive to the public library.
That's true, and I am not anti-AI. I was not only thinking about the environmental effects of some single prompt or a certain amount of tokens.
Neither did I want to say that a car is always more wasteful than some alternative.
But defaulting to the behemoth is inefficient, unless everyone is driven to do it: then it's in some way reasonable.
By adding "corrupt" and "dependent", as well as the economic terms, I wanted to offer a broader critique and create an analogy, not just talk about energy usage on its own.
What I had in mind was: it's easier to go many places that are a mile or less from me, by car. Because everything is obstructed by cars. And I'm atrophied by lack of movement.
Best would be to drive somewhere to move/walk.
People already do that in masses.
And doing shopping by car, because everything else seems unbearable, also takes away your time, apart from wasting energy compared to more, smaller shops that would be reachable by foot, bycicle etc.
I guess you know the argument.
Today, people's thinking atrophies because their LLM is probably right in their summarization of some Wikipedia article, plus 2-3 other random sources.
Or so.
Using the Wikipedia search function is not expensive.
But, I mostly had a bigger picture in mind than what is the cost of inference.
I think it's a good analogy in many ways, and personally I think car-centric society has a lot of flaws. I think the ease that AI brings to tasks may erode mental capabilities in the same way cars have eroded our collective physical health.* That said, it doesn't seem to me that we would be better off without cars altogether, despite all the related issues.
I am concerned about the environmental impacts that AI poses, but they don't seem to me to be so catastrophic. Solar and battery tech has made enormous leaps in the past couple decades, and we will need to pivot to clean energy future irrespective of AI.
*This said, I have become gradually more alarmed over the past decade at the lack of epistemological rigor in the general public, as made apparent through the rise of social media. I don't know that AI becoming a truth-seeking crutch for people wouldn't be more good than bad.
> it doesn't seem to me that we would be better off without cars altogether, despite all the related issues
Oh my god, no. I also want the benefits of automobiles! They are strictly more capable than, say, trains. That's where I would derail the discussion completely when going into details, but no, I am not against cars as a technology.
Apart from all the ethical and social arguments (logistics, ambulances, the elderly, etc etc). But that's not where I wanted to go.
I was making a leap here simply because of the whole complex around prisoner's, dilemma, the commons, state economy, and so forth.
Since at least ~100yrs ago, I guess cars and streets as the primary mode of transportation have also "won the vote" / are what the majority wants, so it's also an interesting analogy for diminishing returns maybe.
Building out more car infrastructure is certainly not controversial where there is absolutely none but there are commercial or residential buildings.
Anyway, lots of associations are worth considering here IMO. The ultimate limiting capacity here, when disregarding all environmental or health concerns, is simply space and the positive externalities (cities etc) around existing infrastructure.
The problem with grandiose statements like the GGP's are that they compare a realized outcome with an entirely idealized outcome they have in their brains as an alternative.
> I was not only thinking about the environmental effects of some single prompt or a certain amount of tokens.
Hand wringing about AI datacenter's environmental impact is well and good. We should keep the data centers accountable for their consumption and waste.
I just wish the same people had been upset the last 20 years with poor water resource management in a lot of areas (the west US especially) with urban, ranching and farming development.
The past may be past, but it's important that even now we point out the relative scale of resource usage, pollution, etc going forward of everything from cars to AI to golf courses to beef.
It's like saying if we didn't have cheap commercial flights people would travel by foot anyways and would consume more resources for food &co. than the plane would consume in fuel...
80% of generative AI queries wouldn't even exist as google searches.
To be clear, your position here is that insurmountable barriers to information is the preferable state of the world?
One claim of the parent comment was that AI is ineffective. For the purpose of finding answers to questions, it is more resource-efficient than the alternatives, and, to your point, capable of answering questions that were impossible to answer via other means before. In what way is that ineffective?
No, they're saying that 80% of genai queries (aka anything sent to an LLM; I won't speak on the validity of the percentage) are not things someone would search on Google. It's things like trial-and-error vibecoding, openclaw-like agentic loops, talking to chatgpt like it's a person, etc. In other words, most genai queries are not for getting "obscure information" or even getting direct information at all. It's about either getting it to do something you don't want to do yourself, or using it as a replacement for someone else (junior dev, therapist, friend, significant other, etc).
That's just what some people generally use to refer to LLM input string/prompt/message/etc. The only thing the LLM can do is return information...in the form of text, so every request is one for information.
If we want to get really pedantic, every generated token is the answer to the query: what's the next most probable token in this sequence of tokens?
If "query" doesn't imply intent by the user, it ceases to be a useful word. You can acrobat your way to imagine a digital system has agency to ask a question before it receives bits, but then any transfer of data could be called a query.
When I post this http request containing this reply, you could say my machine is querying the server to ask "what did you do with the message I just gave you", but then query stops having any useful semantic value to distinguish it from "request"
Regardless, this is tangential. I don't disagree that a lot of LLM use is not in pursuit of knowledge, but enough of it is for me to think that preferring LLMs not to exist is a hard position to defend, at least without making the case for existential doom.
I do plenty of AI queries, both pragmatic ones and some for entertainment: witnessing talktotransformer was mind-bending already at the time! And since then, I've tried frontier models, local, coding agents, and use plenty of them on the regular.
I awe at the capabilites of generative AI.
I also enjoy sitting in or driving a car.
I did not want to make a moral argument, unless you consider each and every form of utilitarianism as moralism.
There's nothing the selfish hate more than hearing their "choices" have a net negative effect. They hate the "doomers", because it puts a damper on their little side-effect free party. Doomers are more often correct because it only requires bare minimum pattern recognition. It requires more effort to defend an action that will certainly be different this time.
AI, Crypto, car-centric urban planning, cardboard suburbs in a barren field with bright green grass.
You tell someone that their selfish choice to drive a pickup truck only to haul something maybe one time a year, they shit their pants. They can't stand it, they start personal attacks and ask "what about you??". They seem to know it's wasteful, damaging, etc but they deserve it for some reason.
I agree with your message but not sure about the conclusion. Cars themselves are commodified luxury available (in the US pretty much required) to everyone, and they do need to be subsidized, both in terms of infrastructure and the lifestyle they require.
But with AI what is the exact price? My understanding is that R&D is extremely expensive, but running non-SOTA models is not that bad. We are getting pretty close to models which can be useful locally in many applications.
Or do you mean that at scale running them locally is not possible and hence the infrastructure price is in data centers, which will be expensive to maintain and scale for demand?
Thanks for asking an open question about my point.
First, because I initially failed to answer your more closed questions (this paragraph is edited in):
> We are getting pretty close to models which can be useful locally in many applications.
Or do you mean that at scale running them locally is not possible and hence the infrastructure price is in data centers, which will be expensive to maintain and scale for demand?
I don't think there's a way around making the best of AI capabilities with minimum price and maximum control, and I'd agree this is met by on-prem data centers, just not in a rationally targeted way.
Back to my original comment:
Because it (my conclusion) was not so clear, and maybe I just wanted to highlight some observations without delivering a real argument for or against things [, I thank you for your open question].
The utility/leverage aspect for AI seems more esoteric than the one for cars because, apart from Chatbots, it's more hidden.
And also, similar to cars (or many other phenomena of industrialization), yes, my first vague point was the subsidization of infrastructure. But also, the power gap: that's something not only associated with AI or cars, but with a lot of technologies we all hold dear: sewage, powerline, logistics, etc etc.
What reminds me of cars in the current AI frenzy is the fixation on cementing infrastructure. And also, I think, a lot more people agree on, for example, some kind of universal right to, for example, clean water.
But all of industrialization confronts people with questions of efficiency, inequality, and collective support.
Most people would, for example, support a right to get a minimum amount of clean water when you are living and working in a tradionally inhabited space (if you're on the social-darwinist side) or at least not harming society (if you're more of a social democrat).
And, similar to the buildup of car infrastructure, and the procurement of resources, space etc for maximum building, giant data centers can obstruct people in buying drinking water. Or walking outside (AI obstructs traditional methods of online collaboration).
reply