News for hackers. Stuff that matters.

fishbone

I fixed this issue. The dom-docx.com Live Converter "Try in the browser" page was running an older version of the dom-docx package from before Page Breaks were added as a feature. I've updated it to the latest version.
I tested this, but it seems like it regressed somehow. I may not be working in the browser side use case right now. I'll have to look at it later this evening. I created a GH issue to keep it on the radar: https://github.com/floodtide/dom-docx/issues/5

Could you update the GH issue with a bit more information about your specific use case?

I hear you, thanks for the feedback. I've done that some already but of course it could be better in more of my own voice.
Since HTML is so rich and the DX is amazing these days, I wish HTML file sharing for the document use case (and using the browser as a client) was widely accepted, it’s another problem/opportunity I’ve pondered a lot.
Not yet, but I’ve actually thought about that and want to investigate that possibility at some point!
Scoring would probably be the big difference because the outcome is to optimize performance or optimize a score or a metric versus just a pass fail.
I did everything with the Cursor $20 plan and the Claude Code $20 plan, so in this particular case it wasn’t actually that many tokens. This was over the course of about four weeks of weekend and evening work.
All of the suite test cases are small fragments of HTML to test specific things, so I probably do need a way to test bigger documents. Thanks for the feedback. I’ll add that to the to-do list.

I’ll try the red hat example later this evening.

Thanks, and just to mention, I’ve had awesome results using Autoresearch loops on other things like SQL performance.

Prompt example:

You are a SQL performance researcher. Run the following SQL query to establish a baseline, then come up with hypotheses to improve performance. Score each result and run 5 iterations. Avoid any regressions, each result must contain the exact same rows and columns.

See https://github.com/karpathy/autoresearch

Thanks for the feedback, I’ll add Word validation to my todo list.
Agreed, visual fidelity is pretty hard, and that’s why none of the scores are 100.
I don’t have MS word installed on my development machine, so I haven’t done much testing with Word, but that does sound like a good idea to run the suite using Word. For what it’s worth I did not notice any issues with LibreOffice, even after running many iterations and tests.
Hey HN, author here.

I do a lot of backend document (docx file) generation work, and updating our templates and backend code is one of my least favorite development tasks. Cryptic errors, minute-plus rebuild loops. I’d much prefer building these reports in JS rendered HTML (e.g., Vue or React), but existing HTML-to-docx libraries in the OSS ecosystem don't produce output that's actually valid, editable Word structure.

I'd had good luck applying Karpathy's Autoresearch pattern (agent runs iterations against an objective score, keeps what improves, discards what doesn't) to a couple of other problems, and figured OOXML fidelity was a good fit.

The Autoresearch process goes like this: render HTML and take a screenshot, use dom-docx to convert to docx, rasterize the docx file with LibreOffice and take another screenshot, score the browser HTML screenshot vs LibreOffice screenshot and measure layout fidelity + editability + speed as a quality metric, feed score back in, and repeat to drive higher fidelity within the constraints of editability and performance. It’s a beautiful thing to watch.

Burned some tokens and ran that loop against 37 real-world HTML patterns such as nested lists, tables, flex layouts and blockquotes (stuff that often breaks converters) and "brute forced" my way to what I hope is a high-fidelity HTML to docx converter.

A few things about where it landed:

- Native OOXML output, real Word structure, not a screenshot or a 1x1 table pretending to be a document - Works in Node, in the browser (no Playwright needed for the default path), and as a CLI (npx dom-docx input.html -o output.docx) - MIT licensed - Full benchmark methodology + results vs the established OSS alternatives: https://github.com/floodtide/dom-docx/blob/main/docs/BENCHMA...

Live demo if you want to test HTML conversion in the browser: https://dom-docx.com

Happy to answer anything about the scoring loop or anything else.

PS: This is the first thing I've open sourced and I'm excited to see where it leads!

Show HN: Wealth Curve – Financial forecasting with local storage and E2EE

https://wealthcurve.app/

Hi HN,I’m a solo dev and personal finance nerd. I had a big and complicated google sheet to project my net worth, retirement and portfolio burn down rates, but it was hard to maintain. I thought I could turn it into a web app in a weekend with Claude Code (wrong lol). It took about 3 months of weekend work, but I’m finally ready to launch.Wealth Curve is a long-term financial forecasting tool....

( Read More... | no comments | on HN )
Re:Ask HN: DIY ice bath equation for water cooling on Tuesday May 09, 2023 @04:28PM (#35879964)
This is awesome, love the python script
Re:Ask HN: DIY ice bath equation for water cooling on Tuesday May 09, 2023 @01:11PM (#35877346)
I’m going to experiment with my setup some more, but I may go your route in the end.
Re:Ask HN: DIY ice bath equation for water cooling on Tuesday May 09, 2023 @10:56AM (#35875283)
Thank you for the advice, do you know the specs on the aquarium chiller by chance? I do plan to use a GFCI.
Re:Ask HN: DIY ice bath equation for water cooling on Tuesday May 09, 2023 @10:26AM (#35874805)
Thanks for the info. I was planning on using a timer and thermostat switch to turn the pump off once reaching target temp and to use gravity to empty the coil when the pump is off.
Re:Ask HN: DIY ice bath equation for water cooling on Tuesday May 09, 2023 @10:22AM (#35874753)
Most of the DIY stuff I have seen involves putting the water directly in the chest freezer. Would need a much bigger chest freezer to fit in and I’m not crazy about the electrocution risk. I’m currently using the make a bunch of ice approach but it is cumbersome.
Re:Ask HN: DIY ice bath equation for water cooling on Tuesday May 09, 2023 @10:20AM (#35874720)
The fins are a cool idea!

Ask HN: DIY ice bath equation for water cooling

I am making an DIY ice bath at home. I have about 40 gallons of water in a tub and a chest freezer. Prior to cooling, the water is typically around 70 degrees F. I am thinking about getting a coil and running water lines through the chest freezer to circulate the water, but I don’t want to waste money and cut holes in the freezer if it’s not going to work. I would like to cool the water to as...

( Read More... | 29 comments | 2 points | on HN )
Re:The 4:6 method for coffee-brewing (2017) [video] on Wednesday June 02, 2021 @03:47PM (#27373174)
For those using Aeropress, are you using boiling water? I use 165 degree water...just curious.
Re:Comparing Svelte and React on Friday March 26, 2021 @09:37AM (#26591963)
I work with Vue every day at my day job and I spent about 200 hours on the side building an online Svelte course. I really enjoyed the syntax and readability of .svelte files. Local dev environment was a great developer experience and the lack of boiler plate was nice coming from a Vue background.

I built an SPA with an Express backend and my biggest complaint was the lack of an official front end router. The community based router libraries had lots of issues and quirks and I didn’t want to lock into using Sapper at the time. Svelte itself was rock solid though and I look forward to trying Sveltekit (think Next.js for Svelte) in the future.

Anyway, here comes the shameless self promotion:

https://www.newline.co/courses/fullstack-svelte

Here’s a quote I like:

A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyse a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.

— Robert Heinlein, Time Enough for Love[1][2]

Good information, so we would have a Neural Net that takes a vaccine input and predicts the human (or animal) immune response, and another neural net that generates the vaccine inputs. I suppose the problem would be lack of labeled training data, which is why I was thinking about the chess example which works by simply knowing the rules of the game.

Ask HN: Could reinforcement learning be used to create vaccines?

My understanding is that reinforcement learning can be used to train neural networks to become chess masters.Would it be possible to pit a virus generator NN vs a vaccine generator NN to create vaccines? Seems like you could train a NN that could generate a vaccines to combat viruses that we haven’t even seen yet.

( Read More... | 3 comments | 6 points | on HN )
Re:Ask HN: Anyone pay a recruiter to find a job? on Friday February 21, 2020 @01:50PM (#22385642)
Thank you for the recommendations!
Re:Ask HN: Anyone pay a recruiter to find a job? on Friday February 21, 2020 @10:40AM (#22383863)
I’m in the South East US and I’m a full stack web dev with 15 years of experience. I’d be willing to pay a recruiter to place me in a good job.

Older »