frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Fugento: How an AI and a Human Built a Magento 2 Assistant Together

https://medium.com/@saccitizen/the-tale-of-fugento-how-an-ai-and-a-human-built-a-magento-2-assistant-together-f1681ab83c60
1•Matsonian•1m ago•0 comments

Logarithms of algebraic data types for property-based testing

https://dl.acm.org/doi/abs/10.1145/3498726
1•fanf2•3m ago•0 comments

Penn State boffins create silicon-free two-dimensional computer

https://www.theregister.com/2025/06/16/penn_state_boffins_2d_cmos/
1•moose44•5m ago•0 comments

How Do Olympiad Medalists Judge LLMs in Competitive Programming?

https://arxiv.org/abs/2506.11928
1•npalli•7m ago•1 comments

Levels.fyi's Over-the-Air Updates on Mobile App

https://www.levels.fyi/blog/over-the-air-updates.html
1•zuhayeer•9m ago•0 comments

phkmalloc Saga

https://phk.freebsd.dk/sagas/phkmalloc/
2•matt_d•10m ago•0 comments

Flashes of lucidity before death: The debate shaking up neuroscience

https://english.elpais.com/science-tech/2025-06-16/flashes-of-lucidity-before-death-the-debate-shaking-up-neuroscience.html
2•domofutu•10m ago•0 comments

Show HN: Zero-config AWS CUR → interactive cost dashboard (DuckDB and Rill)

2•adamkabak•10m ago•0 comments

Improving Continual Pre-Training Through Seamless Data Packing

https://arxiv.org/abs/2505.22018
1•PaulHoule•10m ago•0 comments

Show HN: Nexus.js - Fabric.js for 3D

https://punk.cam/lab/nexus
1•ges•11m ago•0 comments

FreeRDP 3.16 Released with Better SDL3 Client Support

https://www.phoronix.com/news/FreeRDP-3.16-Released
1•Bender•12m ago•0 comments

People who are 'allergic' to humans

https://www.bbc.com/future/article/20250613-the-people-who-are-allergic-to-humans
2•domofutu•13m ago•0 comments

Denmark tests unmanned robotic sailboat fleet

https://apnews.com/article/denmark-robot-sailboats-baltic-sea-bfa31c98cf7c93320115c0ad0e6908c5
2•domofutu•13m ago•0 comments

Cosmic Dawn: The Untold Story of the James Webb Space Telescope [video]

https://www.youtube.com/watch?v=uSMGENDH_QI
1•namanyayg•14m ago•0 comments

After eighteen years of infertility, an AI tool let a couple conceive

https://www.today.com/health/news/ai-fertility-technology-star-sperm-conception-rcna212591
1•namanyayg•14m ago•0 comments

A better way to turn solar sails

https://www.universetoday.com/articles/a-better-way-to-turn-solar-sails
1•namanyayg•14m ago•0 comments

Amazon Ads and Roku Set Pact Giving Brands Access to 80% of Connected-TVs

https://deadline.com/2025/06/amazon-ads-roku-set-landmark-pact-connected-tv-streaming-1236432615/
2•WaitWaitWha•15m ago•0 comments

Should Wyoming Ranchers Paint Zebra Stripes on Their Cows? Science Says Yes

https://cowboystatedaily.com/2025/06/13/should-wyoming-ranchers-paint-zebra-stripes-on-their-cows-science-says-yes/
1•Bender•18m ago•0 comments

China lays foundation for cislunar infra with spacecraft in novel lunar orbits

https://spacenews.com/china-lays-foundation-for-cislunar-infrastructure-with-spacecraft-in-novel-lunar-orbits/
1•rbanffy•19m ago•0 comments

The AI Arms Race: Deepfake Generation vs. Detection

https://www.securityweek.com/deepfakes-and-the-ai-battle-between-generation-and-detection/
1•Bender•19m ago•0 comments

AlphaOne: Reasoning Models Thinking Slow and Fast at Test Time

https://alphaone-project.github.io
3•hullo•23m ago•0 comments

Matrix Is Cooked

https://blog.cyrneko.eu/matrix-is-cooked
6•sanqui•24m ago•0 comments

Retrobootstrapping Rust for some reason

https://graydon2.dreamwidth.org/317484.html
14•romac•25m ago•4 comments

Why digital sovereignty is the new national treasure

https://www.rocket.chat/blog/why-digital-sovereignty-is-the-new-national-treasure
1•rbanffy•27m ago•0 comments

First US college declines federal science grants due to new DEI requirements

https://www.science.org/content/article/u-s-college-first-decline-federal-science-grants-because-new-dei-language
5•Geekette•28m ago•0 comments

Frontend UI is dead – welcome Voice User Interface

https://stan-kondrat.github.io/thoughts/frontend-ui-is-dead/
1•stankondrat•29m ago•0 comments

I Was a Juror on a Murder Trial

https://thingofthings.substack.com/p/i-was-a-juror-on-a-murder-trial
2•bookofjoe•30m ago•0 comments

Can Finland take Europe's startup crown?

https://www.marketplace.org/episode/2025/06/12/can-finland-take-europes-startup-crown
2•mooreds•30m ago•0 comments

Building an MCP Server with Nx

https://nx.dev/blog/building-mcp-server-with-nx
3•mooreds•31m ago•0 comments

OpenAI and Microsoft Tensions Are Reaching a Boiling Point

https://www.wsj.com/tech/ai/openai-and-microsoft-tensions-are-reaching-a-boiling-point-4981c44f
5•jmsflknr•32m ago•0 comments
Open in hackernews

ZjsComponent: A Pragmatic Approach to Reusable UI Fragments for Web Development

https://arxiv.org/abs/2506.11016
51•lelanthran•5h ago

Comments

lelanthran•5h ago
Shameless plug; I'm the author. Criticism welcome.

I use this for client-side includes and web components.

No build process, no web-packer, no framework, no npm requirement. Just include the JS in your HTML and then you can create and include components.

ramesh31•5h ago
>No build process, no web-packer, no framework, no npm requirement. Just include the JS in your HTML and then you can create and include components.

How does the rest of your codebase look?

This is the primary problem with web components. No frameworks sounds nice in theory, but it only solves about 30% of the problem. The rest ends up an ad-hoc mixture of libraries and custom code for state management, routing, styling, cross-component communication, etc, to the point that you end up building your own framework that is brittle and unmaintainable. Applications like this generally end up as a huge confusing web of global event buses or with multiple tightly coupled layers of prop drilling because of that.

There was a dream that was web components once upon a time. It felt like the future. But the APIs ended up half implemented (poorly), and the spec was more or less abandoned by everyone but Google. Browser vendors could have done things right, and focused on pulling in the good things from the framework world (i.e. what happened with jQuery), but they didn't.

spankalee•3h ago
> the spec was more or less abandoned by everyone but Google

This is very, very much not true.

All browsers are very up-to-date with web components APIs, and Safari is leading in some areas like scoped custom element registries, which they're about to ship first.

bythreads•3h ago
Disagree, done several custom frameworks for highly regulated areas and high load userbases - and as long as you keep to seperation of concerns it is a lot more nimble and long term viable - easy to wield that 200000 dependencies just to set a history state
WorldMaker•2h ago
I think Google has done a great job of making Web Components seem both poorly implemented and way too complex. If Angular is the "Google blessed" way of writing Web Components and Angular makes a terrible hash of it, who can build good Web Components?

Angular and a couple other well known frameworks were targeting for far too long pre-spec Google-specific versions of Web Components and Web Components moved quickly past that and settled into cross-vendor specs with smarter defaults and simpler APIs a lot of the marketing damage was already done that Web Components were too complex and too poorly supported.

So much of the Web Components world is stuck with the quagmire of the Shadow DOM, and while there are some generalized use cases for the Shadow DOM, I have the harsh opinion that the Shadow DOM was mostly invented to be "better IFRAMES for Ad Publishers" and not much else. I don't think enough web developers yet realize that the Shadow DOM is entirely optional and its complexity is so much easier to ignore and toss than to try to utilize.

> focused on pulling in the good things from the framework world (i.e. what happened with jQuery), but they didn't.

I'm coming to the growing opinion that between Web Components and the TEMPLATE tag Browser vendors have finally caught up with some of the best ideas of the Knockout-era "Progressive Enhancement" world, assuming you ignore the Shadow DOM as mostly YAGNI.

Sure, a lot of cross-component communication and some of state management goes back to DOM APIs and DOM event management, but there used to be a lot of knowledge in those areas and maybe it past time to return to Vanilla JS ideas about some of that. In the time since jQuery and Knockout, all browsers today have much more consistent DOM APIs for event management, at least.

(Similar for routing. Vanilla routing, even "SPA" routing is easier than ever with modern APIs, even the API not fully standardized and cross-browser yet, but also the improved APIs for hash navigation. Also, Web Components seem a great reminder that MPA routing is great and brilliant, and so well tested in browsers and servers. With View Transitions now generally well supported, and getting better, many MPAs feel as good or better than SPAs even.)

(And I feel like most styling problems with Web Components are self-inflicted with and by the Shadow DOM. It's nice to embrace the cascade again, if you can.)

I was bullish on Web Components for a while, but most of my complaints have disappeared in recent months, and especially in realizing that I was very happy ignoring everything about the Shadow DOM. Sure, I'm not using Web Components without a "framework" but I'm using a far smaller "view engine" than a React or Angular, a lot more "Vanilla", and feeling a bit like it's a Revenge of Knockout sort of era.

lelanthran•1h ago
> Sure, a lot of cross-component communication and some of state management goes back to DOM APIs and DOM event management, but there used to be a lot of knowledge in those areas and maybe it past time to return to Vanilla JS ideas about some of that.

My approach is, actually, an attempt to inject some Vanilla into front-end component development.

WorldMaker•1h ago
I think many of us, as this linked article that kicked off this discussion included, are thinking of various ways of using more Vanilla approaches. I appreciate the above poster's complaints that we aren't in some promised land of being able to do things 100% Vanilla without some form of reactivity management. That's still all in progress, no matter where you are in the Observables versus Signals "debate", Browsers are back to showing interest in native specs for one or both. (I personally think Signals are just "worse, poorly encapsulated Observables", but either proposal is a good building block for whatever the next steps are and thinner libraries to build on top of them will be.) But Web Components are mostly some steps in the right direction, I think, while that other work remains ongoing.

I also like gradual typing too much to expect to be 100% Vanilla any time soon. Typescript is too handy a verification/testing tool and while I'm still watching the native type stripping proposal with TC-39 with a lot of interest, it's certainly not on a fast track.

spankalee•11m ago
Angular has nothing to do with web components. It isn't even a way to write web components.

If anything is the "Google blessed" way of writing web components (Google doesn't really work that way), it's Lit: https://lit.dev/

lelanthran•1h ago
> How does the rest of your codebase look?

Quit neat, compared to the React/Redux things I've maintained in the recent past.

> No frameworks sounds nice in theory, but it only solves about 30% of the problem.

"No framework" is not meant to be a prescription, it is an indication of the dependencies.

IOW, I mean to say "No framework required", I did not mean to say "Don't use a framework with zjs-component".

> the [web component] spec was more or less abandoned by everyone but Google.

Are you being sarcastic, maybe?

fayten•4h ago
I always love seeing more done in the web component space. I think Lit has the no build process captured pretty well and they include things such as a router.

I do prefer the style of of your components more, where you separate out the script and styles with html tags. I don't know if one way or the other is superior for performance, I but just like the separation verse the templated strings in Lit.

With build tools being so straightforward now-a-days, I struggle to see the value in the build less approach. One use case I can think of is maybe a constrained environment where the application contains some kind of customizable user components fully in the browser like a reporting WYSIWIG of some kind.

Is there a particular reason you prefer this approach?

cosmic_cheese•3h ago
With the caveat that I’m generally outside of the web dev sphere aside from casual tinkering: no build process means no setup and one fewer thing that can break. That’s valuable in itself.
lelanthran•1h ago
> Is there a particular reason you prefer this approach?

Compared to Lit? Firstly, I like Lit. My approach is better for me because there are far fewer things to know in order to create a reusable object and there are far fewer things to know in order to use an existing object.

IOW, my approach trades off functionality in favour of a lower cognitive burden for me. I just wanted something that had the minimum functionality I need - create an object and then reuse it. For me, anything outside of that goal is peripheral burden that I'd rather not get bogged down in.

I agree with many here that this is not an approach for them, maybe even for most, but I am certain that if I find something useful that increases my velocity of feature delivery, then maybe someone else will as well.

dfabulich•4h ago
Zjs is a web component for doing client-side includes. The Zjs code itself is itself a web component that extends HTMLElement and registers itself as <zjs-component>. It's only 100 lines long. In its connectedCallback, it fetches the URL of the "remote-src" attribute, and injects its content in innerHTML.

Client-side includes are bad. The industry avoids them, for good reasons.

First, they hurt performance. The client can't start downloading a zjs-component content until its connectedCallback runs. If a zjs-component includes another zjs-component, the client can't start downloading the nested component until its parent component downloads and executes. If your components are nested at N layers, this means that the page won't finish loading until N serial non-parallelizable requests succeed. On cellular networks, where network latency can be measured in seconds, if you have four layers of components, you're looking at adding 10+ seconds to page load.

Second, each client-side include will cause a layout shift, as the <zjs-component> element starts out at 0px tall, and then will change in height as the component loads. This is bad. https://web.dev/articles/cls

Finally, in your article, you claim that reactivity is "out of scope for a component creation mechanism," but there is no universally recognized "scope" for component creation. You'd need to justify the claim that reactivity is out of scope.

If you think reactivity matters at all, then you'd need to demonstrate how to use client-side includes in the context of a framework that does provide reactivity.

HTMX is a lightweight framework that provides a reactivity framework around client-side includes. https://htmx.org/ You might especially appreciate the academic theoretical framework the HTMX team provides in their book, Hypermedia Systems. https://hypermedia.systems/

HTMX is pretty good for what it does; it's not clear that anyone should prefer ZJS over HTMX for anything. But it's also not clear that HTMX is better than more frameworky alternatives, especially React Server Components.

Dan Abramov has written a series of articles explaining the theoretical framework behind RSC. Here's one that's relevant to you. https://overreacted.io/one-roundtrip-per-navigation/

chrisweekly•3h ago
Excellent comment; it's well-informed, accurate, and actionable feedback. Agreed 100%.
bythreads•3h ago
Just use lit, and build to vanilla
lelanthran•1h ago
That's a lot you wrote, thank you for all that effort and time. I will do my best to address them:

> Client-side includes are bad. The industry avoids them, for good reasons.

The industry we are talking about does lots of things that has caused many to consider "the industry" to be something of a running joke.

You may not like client-side includes, but it really is something useful to have. Wanting to have client-side includes and not wanting to spin up an entire tech stack of 5 or so different technologies is not unreasonable.

> First, they hurt performance. [...] On cellular networks, where network latency can be measured in seconds, if you have four layers of components, you're looking at adding 10+ seconds to page load.

1. The first time, sure. It's 10s the first time those 4 components are downloaded. Any other component using any of those 4 components on the rest of that page, or if that page is reloaded, will have a 0s download.

2. On cellular networks I currently get longer wait times than that for SPAs used by the mainstream frameworks anyway today. I'm not losing any sleep over the pathological cases which affect mainstream frameworks and libraries as well.

3. I call it pathological because I feel that it would be an extreme case to have lots of components being downloaded, of which only a few get reused. The whole point to reusing is so that the component only gets downloaded once, even if used in multiple places.

> Second, each client-side include will cause a layout shift, as the <zjs-component> element starts out at 0px tall, and then will change in height as the component loads. This is bad. https://web.dev/articles/cls

I agree. It's a trade-off that many sites currently make, SPAs included. While I find it incredibly annoying, this component is for when that trade-off decision is already made.

> Finally, in your article, you claim that reactivity is "out of scope for a component creation mechanism," but there is no universally recognized "scope" for component creation. You'd need to justify the claim that reactivity is out of scope.

I'm a bit confused about this; if there is no universally recognised "scope" for creation of an object in an OO environment, why would I have to first define what scope is and then defend that decision? Most (all?) mainstream OO approaches don't have reactivity within scope for the definition of an object, so I feel that any claim that reactivity is within scope for this specific OO approach needs to provide some sort of reason why that an exception must be made for zjs-component so that it is measured against a higher bar than other OO approaches.

> HTMX is a lightweight framework that provides a reactivity framework around client-side includes. https://htmx.org/ You might especially appreciate the academic theoretical framework the HTMX team provides in their book, Hypermedia Systems. https://hypermedia.systems/

I've read those.

Regardless, if you are building an SPA with Facebook level number of components, then this is not for you. IOW, this may not suit your use-case, or even most of your use-cases. I find it suitable to an embarrassingly large number of use-cases, though.

I build Line-of-Business applications for internal use at companies. Even the most complex UI in these LoB applications have only a few different components, and at most two levels of nesting (these component objects are not like React components at all - they're meant to be instanced inline in HTML, which is both a drawback and an advantage).

spankalee•4h ago
I'm guess that since this is an academic paper and not say, a website or GitHub repo, that you're in school. But given the research paper nature of this, did you want to contrast and compare to other methods of authoring web components?

There are many existing and popular approaches out there. Is your take easier, faster, or more capable? That discussion would be interesting.

Two that I help maintain are Lit (https://lit.dev) and Heximal (https://heximal.dev/). Of those, Heximal might share the most with Zjs.

dleeftink•2h ago
Also Facet.js! Declarative to a fault.

[0]: https://github.com/kgscialdone/facet

lelanthran•1h ago
> I'm guess that since this is an academic paper and not say, a website or GitHub repo,

It is a github repo. And a website too, IIRC. And now, finally, it is a paper as well.

I haven't been evangelising this as I have no burning desire for popularity. I posted the link here for discussion and criticism.

> that you're in school.

I wish. I've been professionally developing (i.e. getting paid for it) for close on to 30 years now (I am almost 50).

I like Lit, but was not aware of heximal. Will check it out.

ilarum1•4h ago
This is cool. Remindes me of simplicity of https://tg.pl/drab which need phoenix/elixir.
willmeyers•4h ago
For anyone curious, the source code: https://github.com/lelanthran/ZjsComponent/
hirako2000•3h ago
I came across Yoffee, also requires no specific build system or dependencies. Proposes to either code native web components, or not. No web components means instances are used to get fragments, and still support a state store. Not only one state store can be passed over to instance, as many as we want.

Can you compare with ZjsComponent?

Pure html and JavaScript from my experience is a relief, I still stuff the trauma of seeing jsx error cluttering the console with barely anything useful to troubleshoot.

How doé ZjsComponent compare, any advantage with your paradigm?

sandreas•3h ago
I like vanilla components... Personally I think that instead of providing either frameworks or vanilla compnents, frameworks should provide a way to compile components to independant vanilla JS (similar to svelte not needing a "runtime").

This way it would not matter this much how you deploy components and this compiling step could probably have its own API with hooks and callbacks.

notnullorvoid•21m ago
Older Svelte versions may not have needed a runtime, but Svelte 5 definitely does.

Runtimes are good, the abilities of web components suck compared to most framework runtimes.

mosdl•3h ago
Seems to be taking how old frameworks used to work in the old days (download some html/js and run in an closure) and wraps it into webcomponents. Neat, but not sure why its a paper.
coneonthefloor•2h ago
Yea, I feel like we are coming full circle with frontend JavaScript. To me this seems like a concept that has been around a while, but it’s being presented as a novel idea. I’m also baffled as to why it’s a paper.
lelanthran•1h ago
> Neat, but not sure why its a paper.

I have a very good reason for that[1]. I will, however, concede that this approach might have been used somewhere public in the past, even though I have no knowledge of seeing this approach previously.

A poster downthread mentioned a link that I am going to read up when I have time, that seems like it is the same approach as zjs-component.

-----------------------------------

[1] Not "done on a bet", but pretty similar.

SoKamil•1h ago
Okay, but what is the reason? I didn't understand it from your comment.
croemer•49m ago
He has maybe mentioned to someone that he'll write a paper on this topic
amingilani•2h ago
Hate to be the one to pull a dang, but, remember:

> Be kind. Don't be snarky. Converse curiously; don't cross-examine. Edit out swipes.

— https://news.ycombinator.com/newsguidelines.html

krystofee•2h ago
Is there some clean way to pass components or just html to components using this framework without having them in strings? This is issue I see with most of these approaches.
lelanthran•1h ago
> Is there some clean way to pass components or just html to components using this framework without having them in strings?

No, there isn't. Parameters are passed in as plain strings.

> This is issue I see with most of these approaches.

I didn't need to solve 100% of the problem, getting the most common 90% is sufficient.

lacoolj•1h ago
This kinda reminds me of a slimmed down version of Polymer.

I like the simplicity, and it might have potential to stack upon itself to provide the other missing elements like reactivity, etc.

Keep up the good work