6 ms·
I didn't submit this, but I'm the lead dev for Blitz. AMA. One thing to note is it's not quite ready yet: - The text input and focus system are pretty basic
by nicoburns 2y ago
I didn't submit this, but I'm the lead dev for Blitz. AMA.
One thing to note is it's not quite ready yet:
- The text input and focus system are pretty basic
- We don't support scrolling (other than the root viewport)
- Complex CSS selectors like nth-child and :has aren't working correctly yet.
- Event handling integration with Dioxus (the React-like framework that sits on top of Blitz) isn't robust or fleshed out yet (only clicks work, there is no preventDefault)
- The currently networking is super-dumb and does synchronous requests on the main thread. We need proper async and/or multithreaded networking.
- We have put very little work into performance - we're currently recomputing style/layout/paint every frame.
- Relatedly: We have few dumb memory leaks where nodes are not cleaned up. We know where these are, we just haven't fixed them yet.
- Less critical, but things like shadows, web fonts, calc, float layout, and form controls other than text input are missing (see README for more).
All of these are basically a case of "building a webview is a big task, and we haven't gotten around to that yet". We're hoping to have something a bit more complete in 2-3 months time.
There are some more screenshots here:
https://github.com/DioxusLabs/blitz/issues/23 https://github.com/DioxusLabs/blitz/issues/23
- 9dev 2y agoOhh, this is interesting. I'm just now looking for a solution to capture screenshots of websites, ideally from a previously crawled representation. From what I can gather, all existing offerings just run a Chromium instance and request a screenshot from that, which is pretty expensive (both in operating and as a SaaS product). So, Blitz should be a pretty ideal fit for that, right? Can it run in headless mode and save a screenshot currently?
- nicoburns 2y agoIt can't, but it'd probably only be a few hours work to add. We'd just need to plug the rendering library we're using into an image encoder rather than a windowing library. There might also be some extra work required to do tiling if you wanted a screenshot that is the full height of the HTML page (bigger than will fit in a single GPU texture), but I can't imagine that would be too hard.
- 9dev 2y agoThat’d be an amazing extension with lots of potential to mix up the existing Screenshot aaS business. I’m no Rust dev, so I can’t help here, but I’ll follow the project closely!
- nkozyra 2y agoGiven general css support is not complete, would you really want a screenshot of something that might look radically different on a commonly used browser?
- nicoburns 2y agoI guess perhaps such functionality will be more useful when the CSS support is more complete?
- nicoburns 2y agoI added an example of rendering to image today. It's a bit rough atm (not very configurable), but it seems reasonably fast.
- nwienert 2y agoYou can use Playwright with Webkit, which is much lighter weight than Chrome.
- the_duke 2y agoMany websites don't render properly anymore without Javascript. A pure "html + css renderer" would probably be of limited utility for screenshotting.
- TimTheTinker 2y agoYou might also look into trying Prince XML. Its happy path is typesetting via HTML/CSS, but it may fit your use case as well.
- hougaard 2y agoHow about rendering with print specific CSS to images/pdf ?
- nicoburns 2y agoImages is easy. Although we'd need to support the print-specific CSS in layout. PDF is more complex but definitely doable. It wasn't part of our initial plans but is rapidly making it's way up the priority list due to popular demand (and we are of course an open source project, so we'd be very open to people contributing PDF rendering support).
- jokoon 2y agoPersonally, I would rather design a new document format, with simpler semantics, that is easier to render. HTML feels quite complicated, and also it was not designed for dynamic rendering. I like lean and kiss, and html doesn't feel like it's lean or simple enough for me.
- rapsey 2y agoMillions of developers know html/css
- satvikpendem 2y agoYou might like this article then, by the team lead of Flutter. https://docs.google.com/document/d/1peUSMsvFGvqD5yKh3GprskLC3KVdAlLGOsK6gFoEOD0/edit?resourcekey=0-bPajpoo9IBZpG__-uCBE6w https://docs.google.com/document/d/1peUSMsvFGvqD5yKh3GprskLC... https://news.ycombinator.com/item?id=34612696 https://news.ycombinator.com/item?id=34612696
- kevincox 2y agoThat sounds awful. Some of my favourite thing about the web are the semantics. This like links that have common shortcuts across all sites (like open in new tab) and a rich contect menu (send to another device, archive at archive.org). I have extensions to translate text to find URL anchors in documents. If the web primatives where WebHID + WebGPU every site would lack any of these. Of course this would come from the Flutter people who don't seem to care about this. Flutter on web is completely unusable and often Android and desktop versions are barely tolerable.
- satvikpendem 2y agoThere's no reason extensions can't be made for it as well, HTML and CSS in the browser is just rendered via Skia anyway, so it's not much different to keep the renderer but change out the underlying languages. This is in fact exactly what Flutter does.
- 2y ago
- the_duke 2y agoOut of cursiosity, what's the motivation of combining a bunch of different components yourself over building on something like Servo or webkit?
- rapsey 2y agoYou can't remove the JavaScript engine from Servo.
- mkl 2y agoWhy would that be? It seems quite unlikely to me.
- rapsey 2y agoBecause it is central. From what I understand the DOM is completely JS. Blitz is basically the project of removing JS from servo.
- nicoburns 2y agoIt uses the GC from the JS engine for it's entire DOM implementation which definitely makes it tricky. There are also some other bits you'd probably want to rip out like gstreamer for media support. We looked at using Servo's layout support. But it isn't really designed to be used standalone (although it could be if that was prioritized!). And we'll probably add a Webrender rendering backend at some point (Blitz is designed to have pluggable renderers).
- nicoburns 2y ago1. Projects like Webkit are intimidating from both a codebase size and a commit frequency POV. We don't have the expertise or the engineering bandwidth to maintain such a solution. 2. We hope that by building a modular solution we might be able to lower the barrier to entry for building browser-like software. 3. We're a lot smaller. Servo is 100mb+. Blitz is 20mb out of the box. Potentially as small as 3.5 mb with optimizations. 4. We want to be a lot more customizable. Want to add your own layout algorithms? Image formats? Build your own native widgets with custom painting and accessibility? Fit into your existing render backend? Then we want that to be possible. Don't want SVG support? or AVIF support? Or network support? Or Float support? Then you should be able to disable it and not pay the cost for it. 5. We want our components to be usable in other contexts. For example Taffy, our layout library is used in several GUI frameworks. Many of our other dependencies are also generally usable.
- rob74 2y agoPersonally I wonder what the motivation behind choosing "Blitz" as the name was. Sure, it means "flash" or "lightning" in German, but it also has some pretty negative historical connotations. E.g. if you google "blitz wikipedia english", you get "The Blitz" as the first result, which refers to the bombing campaigns of the Nazis against Great Britain during WW2 (https://en.wikipedia.org/wiki/The_Blitz https://en.wikipedia.org/wiki/The_Blitz). Also, there is the term "Blitzkrieg" (https://en.wikipedia.org/wiki/Blitzkrieg https://en.wikipedia.org/wiki/Blitzkrieg), referring to the Nazi invasions of Poland and France.
- infotainment 2y agoThat seems like kind of silly objection, why should a common German word be considered harmful because it was used for a bad thing one time?
- atombender 2y agoThe word is in common use, especially terms like "ad blitz", "press blitz", etc. One of the headlines in the New York Times yesterday was "Summer Blitz Exemplifies Status of Remade Contest". A search [1] reveals many uses. [1] https://www.nytimes.com/search?query=blitz https://www.nytimes.com/search?query=blitz
- notheyarent 2y ago“ Anecdotally, my psoriasis disappeared after I switched to a strict vegetarian diet. I can't prove it, though, so I don't go on Reddit making unscientific claims I can't back up with evidence.” There will always be exceptions like your case. However it is clearly the case that there aren’t hundreds of different types of gut fungi which grow out of control over a dysbiosis occurs in the guts microbiome. There is generally one type and it is called Candida. The problem is called a Candida overgrowth. Candida generally eats carbohydrates and sugar. A carnivore diet will generally starve it and cause a die off. The Candida generally released toxins that cause auto immune disorders. Now I’m speaking in the cases of most not all people who experience auto immune disorders and where those disorders are caused by the guts microbiome. There are also the cases where the gut has been damaged by gluten and other plant materials and is leaking food into the blood. As far as I’m aware no animal flesh of any type does such damage to the gut. No fungi eats animal flesh. You seem to think gut dysbiosis is one bacteria dominating others. No. It is a fungus in most cases. A single called yeast that rapidly duplicates called Candida and eats plants. Unscientific only because the science is behind
- miki123211 2y agoWhat's your story regarding accessibility? Done? Planned? "we pretend disabled people don't exist until the government tells us otherwise"?
- haunter 2y agoWhy are you so hostile?
- mwcampbell 2y agoI think the hostility is understandable when you consider that blind and other disabled people, like myself (I'm partially blind) and the poster of that comment, live every day having to work around widespread indifference toward our needs. I'm not immune to it myself; see some of my older HN comments on GUI toolkit accessibility, before I started AccessKit.
- nextaccountic 2y agoMost newer GUI libraries entirely neglect accessibility and focus exclusively on rendering. Maybe accessibility is seen as too much effort for too little gain? It's kind like most CLI programs nowadays don't come with a man page (nor an info page) and think that an autogenerated `--help` is enough. Except that nobody is excluded from using your application just because it doesn't come with proper documentation
- mkl 2y agoFrom the readme: "Blitz builds upon: [...] AccessKit for accessibility"
- nicoburns 2y agoWe have the basics (exposing an accessibility tree that is visible to screen readers, a keyboard controllable focus system). There's a lot more work to do be done to make it work well (but that's also true of Blitz in general). We're building upon https://github.com/AccessKit/accesskit https://github.com/AccessKit/accesskit which provides a cross-platform abstraction over the OS accessibility APIs.
- wslh 2y agoCould you share what are the most complex engineering parts that you should deal with? Could you share your engineering documents even if they are just WIP? Personally I am interested in how engines like Blitz, Servo, et al could be built in the future using formal methods practices. For example, start with definitions and generate part of the system. Nowadays, this includes LLM but I see them more like great tools than AI systems. Also things like Z3 comes to my mind. BTW, some of my companies has a research branch on things like this.
- sandGorgon 2y agohave you built Blitz for others to build browsers on ? I build Wootzapp (https://github.com/wootzapp/wootz-browser https://github.com/wootzapp/wootz-browser) - we are kind of like Robinhood for data labeling. people can spend time labeling web data/images, etc in the browser and earn. Right now we are based on Chromium. Wondering if Blitz is looking to be the pluggable renderer for other browsers. P.S. we are on the mobile (android today and ios tomorrow).
- nicoburns 2y agoWe've definitely built Blitz for other to build on. Whether it's feasible to build an entire browser on top of it... maybe. But for the being we are focusing primarily on use cases that don't need everything a full browser engine provides and can restrict themselves to a subset: - Application UIs - High-fidelity markdown previewing - Perhaps PDF rendering, etc. - Embedding web content within a wider system in an integrated way. Etc. It would be very cool if someone wanted to add actual JS scripting and DOM APis on top though.
- rerdavies 2y agoI get it. I did my last project with a Web UI because that's the only reasonable cross-platform UI rendering engine I could find. And on Linux, a far superior choice to GTK, which doesn't seems credible because it requires a complete reimplementation of your UI code on every major release, and QT which is held hostage by commercial interests, and licensing terms that are inscrutable. For a UI engine for native applications, it seems like a sensible strategy: use a layout language that developers are likely to already be familiar with. Hopefully, in the longer term, there will also be a Blitz-TML library with higher-level UI components as well. Good luck with this. It looks interesting.