News for hackers. Stuff that matters.

yeargun

Hey,

I don't like Browsers to go CISC way. Simpler -> finer ?

Why?

Any feature that we add up indeed cause some extra CPU cycle. I am not a believer that we need an extra regex like this.

Of course, the overhead caused by this is minimal, so is the benefit. Also very tiny percent of web apps will use this anyways.

It could make the shipped css/js to some extent.

Overal I don't like this tradeoff. I dont want web to have more fanout

Show HN: LilScript makes JavaScript libraries smaller

https://yeargun.github.io/lilscript/LilScript is a typed, compression-first language that compiles into js and sometimes into exec(will be more stable in future). The compiler mangles, reshapes the program into optimized js that happens to be 5-15% smaller (after gzip/br compression or raw) compared to the best performing JS toolchains like oxc/esbuild/terser/..## What has been proven to work...

( Read More... | 2 comments | 14 points | on HN )
Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @11:09AM (#48491418)
yeah I saw it, thats a crazy trick
Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @11:06AM (#48491368)
Yeah yeah, tbh even though I branded it like that in the website, packing strategy & overall, its pretty much an apparent technology/library. I realy wanted some such technology 2 years ago, while genai text layouts were lame ash, and I questioned why noone does something like this (diffusion does not play well, or we havent figure it out yet, who knows? https://blog.google/innovation-and-ai/technology/developers-... )

And overall one of the exciting part for me is, to be able to have composable & editable images, hopefuly generated by future genAI models.

And finally, I just realy wanted to rant over what a 'digital image' is

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @10:10AM (#48490613)
GGs on the library

.hmml might be more hassle free then zip options for web apps. With zips, I think it will require more js bundle & processing to work.

meanwhile with .hmml, its already gzip/br compressed in cdns, and decoded natively by the browser

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @09:44AM (#48490263)
yeah but you know.. it needs to be either base64 or a link

thats why .hmml is a packing strategy to mitigate that, single pack

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @09:31AM (#48490123)
hey, yes.

1- html/css has more layout capabilities. 2- js 3- its a packing strategy. If you plan to serve images + svgs altogether, either you need to base64 encode or pack like hmml, binary

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @09:29AM (#48490102)
Slop :D

can you revisit please? What browser are you using ?

The library is not curing cancer And also it's the first time im hearing that its not working.

My goal was to discuss the meaning of what a 'digital image' is.. You can also take a look at this https://www.reddit.com/r/Design/s/7KLKg3wS0D

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @09:13AM (#48489911)
yeszaaddy

people are crazy for sure

https://youtu.be/O_nE4O5JRBQ

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @08:51AM (#48489647)
yes but not every image/visual is efficiently representable with svgs. sometimes we need rasters
Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @08:30AM (#48489433)
A: I want to serve html with images all in single pack

You have 2 options.

- Embed images into html (base64, size overhead)

- embed html/css/js into media binaries

.hmml is the packing strategy for option two. 2kb js for encode/decode. And extra rantings around what a 'digital image' is

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @08:21AM (#48489355)
Same HTML specification does not support .hmml

Until they support .hmml imma close my image tags. But thanks for highlighting

(its a joke)

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @08:14AM (#48489300)
sorry for this, im updating

in the meantime you can take a look at this

https://www.reddit.com/r/Design/s/hv0hyBow9I

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @08:13AM (#48489295)
Same zip also helps serving .hmml from cdns smaller (gzip/brotli)

Even then base64 is worse in size though

Also I wouldn't prefer serving a zip and load and render it within my web app (extra overheads).

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @08:11AM (#48489280)
I mean,

https://eddocu.com It's the worlds most performant pdf / pptx editor on web.

I have a page that I list documents, each with their thumbnails. I serve medium quality rasters(.webp) for them.

I could rather do it via hmml to save up network space for instance. I convert pdf/pptx/docx into completely editable with html at Eddocu.

So I already have everything in html, css, svg, image.

For the ones that can get represented with .hmml i could serve hmml link maybe.

Its an overengineering maybe.

But thats how I made https://eddocu.com world's most performant pdf/pptx editor. (alpha release, has bugs.)

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @08:05AM (#48489234)
If you plan to serve your image with a self contained, single pack.

Then with html + rasterized images (.jpeg/.png, ..) you would have to pay extra size overhead caused by base64.

With hmml, you dont

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @08:04AM (#48489220)
Yeah I agree

in fact this is both a packing strategy or a POV of thinking. Next browser versions could support it.

<img src="html-underdog.hmml" />

or

when tomorrow's genai models mix declarative images with rasters, then they would like something like this

or

OS -> html-underdog.html double clicks -> browser opens it.

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @07:52AM (#48489120)
thats a great observation. In fact, I also tried how efficient wall painting is :D

https://x.com/yeargun24/status/1825516494861508943?s=20

And, yes. HTML & CSS rendering without js is doable with like max 400mb of ram? Idk. Sometimes the tradeoff worths, sometimes not

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @07:50AM (#48489091)
yes exactly.

you can go devtools at https://hmml.eddocu.com

it downloads single binary that contains media assets (svg, image, video, ..) and html/css blueprint, even js (security concerns!)

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @07:49AM (#48489079)
Nope

PDF is an irreversible format in terms of editability. (btw I build the world's most performant pdf/pptx editor at https://eddocu.com , I would enjoy if you have any feedback)

Regardless, I cant find the relation in between.

It's like an abstraction that might help future genai models, or a packing strategy, or ..

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @07:47AM (#48489063)
Completely agree with that. But look whats the situation with MHTML.

""" Open Bug 40873 Opened 26 years ago Updated 27 days ago """

So if you need some such feature in your web app, and if you are okay with 2kb encode/decode js. Its all good.

At least the posts are pretty much not AI slop I guess.. But I'll take your feedback. Thanks!

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @07:40AM (#48488996)
In fact it has lots of use cases,

1- For design tools, they can combine multipe images, texts, svgs and serve them with single pack/abstraction

2- When you need editable/composable images.

3- Future genai models for generating visuals/html/js/svg would have more feature rich abstraction/toolset

4- When you want to prevent base64 size overhead

Re:HTML is a native image format, hear me out on Thursday June 11, 2026 @06:38AM (#48488554)
## What's an image

We consider rasters as image (.jpeg, .webp, ..)

We also invented svgs, its a vector. SVG is a declarative language, has its own format and has own renderer

HTML, CSS is no different. `<div style="background:black">html is underdog</div>`

Having this perspective on our mind, even considering any imperative code as a native image makes complete sense. `canvas.drawCircle();`

So, .html/.hmml/.js is as image as .webp

====

## How can we/future's genAI models could leverage the world's most popular and feature rich image format (HTML, CSS, JS, SVG, IMAGE altogether). And how can we leverage it to build editable/composable images?

This so to 'popular' image format we call .html has a caveat. It's UTF-8, and whenever you need to embed any resource, you either need to base64 encode it(it has extra size overhead) or link the resource as a seperate thing. So.. as you decide to serve single pack of data for a single image, a binary packing strategy makes sense.(Image can be anything as we discussed earlier)

To match these concerns, we created/proposing you a new format, HMML (HyperMedia Markup Language).

HMML (HyperMedia Markup Language) is a declarative+imperative markup+ language for images/videos/media.. *HMML is HTML, CSS, JS, SVG, image, but not UTF-8.*

https://hmml.eddocu.com

and we have a npm library that does encode/decode of this binary format, and mounts the so to image into dom. (2kb js for encode/decode each. For comparison React is 90kb js. )

`npm i @eddocu/hmml`

# image-leftdog-rightcat.html

``` <div style="display:flex"> <img src="base64" alt="i am dog image" /> <img src="base64" alt="i am cat image" /> </div> ```

Apart from doing this, hmml does embed the html, css, js blueprint into media binaries

# image-leftdog-rightcat.hmml

`binary stuff`

People already do similar things. But this format or POV of thinking accepts html/css/js as a native image format. Excited to see if future operating systems/browsers also accepts this format. <hmml /> or <img src="maybe.hmml" />

===

``` <Technical-Appendix> The word "green apple" is an image, that has no format and no renderer.

`const vectorMultiDimensional_768 = get_word_embeddings("green apple")` Now the word green apple has a format, its: "embedded by Embedding Model X" If you had a renderer as such Embedding_Model_X.render()

Now you could call entire english sentences/paragraphs are images. </Technical-Appendix> ```

bs or not. what you think?

Show HN: Giving HTML, Canvas Superpowers

https://github.com/yeargun/chromium5/pull/1

DOM rendering has been the main performance bottleneck for the web apps for years. I added 2 NEW JS APIs to Chromium so DOM rendering is no longer the bottleneck.Here's how it works:1- You can rasterize any divs, (literaly, precisely)2- You can freeze/lock rasterization of some divs (contain: x, but stronger)https://github.com/yeargun/chromium5/pull/1only 355 LOC change, 2 hours(compilation),...

( Read More... | no comments | 2 points | on HN )
Re:JavaScript Is Enough on Sunday March 22, 2026 @07:34PM (#47483516)
GJ one your library

One random recommendation I could give based on my experimentations on both firefox and chromium

you can attach symbol based custom properties to each such dom node 'class'

and apart from using .matches(), symbol attribute check. this outperforms class based equality checks by a small margin.

very marginal but hey, you are clearly tryharding.

thanks, I can not make it public since it accesses AI endpoints and stuff. you can use the credentials though. username:ppl password:12345

Show HN: I've built a web based pdf/docx/pptx editor, the format .ldf

https://learny.academy/about

When compared to pdf, it's:- Fully editable, collaborative- Faster- Smaller in size- Fully streaming (you only load the pages you view/about to view)- Most importantly its not IRREVERSIBLE. Meaning, you dont need to do llamaindex or use pdf parsers. Its some protobuf schemes- Fully HTML ally- Might take less resources (greener)- AI native.I am planning to make it like canva+. And its also for...

( Read More... | 2 comments | on HN )