News for hackers. Stuff that matters.

byteface

Re:Ask HN: What are you working on? (September 2026) on Tuesday September 15, 2026 @02:36AM (#49708576)
I'm building a Python Browser and need your help running agents on conformance tests https://github.com/byteface/chromonic/

cd to tests/layout..

git clone --depth=1 https://github.com/web-platform-tests/wpt.git

tell it to run the tests and fix any issues with layout and append any issues with domonic into the PLAN.md

I'm targetting the CSS2 folder atm.. so you can tell it to switch to any folder within there for now.

Thanks,

Show HN: Myjs An accidental pure-Python JavaScript interpreter

https://pypi.org/project/myjs/

Hi HN! byteface here. myjs was a recent accident I'd like to share.Several years ago I began writing DOM API's in Python as a curiosity: https://github.com/byteface/domonic/Every now and then I do another pass rolling in more features from the MDN pages. I have lots of unit tests but found that porting real code and libraries was a useful test of the DOM compatibility. But I didn't want to...

( Read More... | no comments | 6 points | on HN )
Re:Pinocchio is weirder than you remembered on Friday May 08, 2026 @04:21AM (#48060246)
He's is selfish. Also cruel but funny, very gullible, often impulslive... alive.

He was ported to Russian too but they called him Burattino (Italian for 'puppet').

The image of burratino goes back hundreds of years before the story was ever written. He was one of the Zanni characters alongside other lower-class mischevious, comedic 'naughty' (anti-authority) characters like Harlequin.

Yet still it costs several pounds a day to heat your home in winter. People are going back to log burners. I've never seen so much coal/wood sold at the supermarkets during winter. I've got some electric blankets which is great but really energy costs seem to be spiralling.
Re:Ask HN: How to Be Alone? on Monday March 09, 2026 @04:25AM (#47306197)
pain is the bootstrap. The only truth
Re:Ask HN: How to Be Alone? on Monday March 09, 2026 @04:21AM (#47306172)
It's not lonliness, it's solitude. Time to find yourself and your creativity again.

You were codependant and need to learn how to be independant again. Living for you, just for yourself. You've spent most of your life living for others. Now it's time for you.

Try not to drink alcohol. Focus on your physical health. Gym/tennis/saunas/running/golf any physical activities you can.

Re:The Fall of StackOverflow: A Data-Driven Analysis on Wednesday August 28, 2024 @04:37AM (#41377348)
To be fair I haven't used it for about a year. As I recall I joined about 40 rooms though and not all were busy. But I think in general if your question is esoteric you would have to peel of into a room with someone with the domain specific knowledge. Some problems require a wordy description of the problem and that wont fly well in a live chat. I was really just after verification that my solution was optimal. But sometimes there just isn't a better way.
Re:The Fall of StackOverflow: A Data-Driven Analysis on Wednesday August 28, 2024 @04:11AM (#41377194)
You're right. For me personally, Discord was killing Stackoverflow about a year earlier. Waiting a week for a reply on Stackoverflow was becoming dull while discord live chat rooms were buzzing with instant feedback. Even as copilot first arrived it wasn't a scratch on asking an room of professionals at realtime. But now chatGPT has become a bit more fledged you can see why it would dent other platforms. I've often thought about this as how would you train future bots if all we do is talk with them now?. Where will they read their answers?
Dogs are ridiculously good at intuition, reading body language and hearing. My dog can hear me put my socks on when i'm in my bedroom and she's in the kitchen. It can seem they are psychic. They can sense when I'm acting with intentions and what those intentions are. The dog might have sensed you noticing your friend from a subtle change in your heartbeat or breathing.
Re:Wasting time in tech interviews on Tuesday June 28, 2022 @05:35AM (#31905825)
There's a lot these tests don't pick up for sure. I feel soft skills is one and being focused on the day to day tasks is another. By hiring based on drills you run this risk of hiring a nasty or emotional person that just wants to use framework x rather than do any of the mundane bill paying work. If soccer teams started hiring based on ball-juggling skills they'd be full of street perfromers and clowns rather than world class strikers. I find tests are really bad for generalists too or older people who can't remember vividly the math they did at school. However we gotta suck it up and it is quite fun refreshing some skills and knowledge between gigs. What's worse is when you pass the tests but then don't get the job. Makes you feel it was something about you personally.
Re:GitHub Star History Graph on Saturday May 28, 2022 @08:08PM (#31544998)
this is really cool. nice work
Re:Web scraping with Python open knowledge on Saturday May 28, 2022 @05:33AM (#31538931)
Have you noticed selenium now opens chrome in some kind of 'dev mode' that stops access to cookies so you have to faff more. Makes you wonder if better to use pynput
Re:Web scraping with Python open knowledge on Saturday May 28, 2022 @05:29AM (#31538903)
sorry i meant cssselect... https://pypi.org/project/cssselect/ which converts to xpath.
Re:Web scraping with Python open knowledge on Saturday May 28, 2022 @05:08AM (#31538813)
I'm not sure about quicker. Doesn't scrapy use elementpath?. which converts a css query to an xpath under the hood as there is no complete CSSOM available for python. Likely as there is no modern standards based python dom to operate on so doing it on lxml tree is probably the best option. I find the main difference is xpath can return an attribute value where as css returns the node. You can use either from the terminal in my lib... https://github.com/byteface/domonic (as it uses elementpath like scrapy)
Re:You Should Compile Your Python and Here’s Why on Saturday April 30, 2022 @02:17AM (#31213806)
After reading the article last night. I spent the whole evening about 5 hours getting one of my DOM libraries to compile with mypyc. It's a hacky codebase with little to no type hinting. I had to rewrite a fair abit to appease mypy and in most cases just used 'Any'. It's still got runtime issues and is buggy but I got at least a 2x speed increase on rendering a single node... https://github.com/byteface/htmlx/blob/mypyc/benchmarks.md

However I was unable to compile from my mac, could only compile using linux. but that could be as I'm using older version of dev tools.

Re:A dirty dish by the sink can be a big marriage problem on Thursday April 14, 2022 @02:53AM (#31024073)
I've had to take advice that saved my relationship. It doesn't feel natural but that's what changing behaviour is about. Never stop worshipping your wife. Remember she's your Queen. You put her on a pedestal and would do ANYTHING for her. Climb a tree for honey, slay a dragon. Suddenly making a cuppa or cleaning a cup is easy right? I did ask a friend once what he did when his wife started tidying and nagging and he said he just joined in tidying. If I'm too busy to help I often transfer a large sum of money to her account without telling her. Or maybe later I go out to the garden or garage and sort that out. I remember there's a bit in the classic book 'Men are from Mars" about just the thing the author is talking about and he really could have done with reading that book. I read it about 20 years ago but it had the bit on 'relationship points'. Now he thought his salary was worth 50 sex pts. But really it was only 1. and the dirty dish was worth -1. So he was left on 0 pts.
Re:Down the mechanical keyboard rabbit hole on Friday March 18, 2022 @04:15AM (#30719723)
The small mechanical keyboards are missing the small backtick which is also ё in Russian.
I just grepped some sitepackages and saw this. Is it an example of what the author is saying?... https://github.com/gitpython-developers/GitPython/blob/main/...

If so that would appear common as came up right away.

The death of Superman (Graphic Novel)
Re:Ask HN: Who wants to collaborate? on Tuesday February 01, 2022 @06:12PM (#30171013)
I don't think you can do this one as a hobby really. You need to store brains which means taking them out of peoples heads or getting hold of animal brains. Plus you need to create liquid nitrogen and you also need a block face scanning electron microscope which has diamond parts and scale that up to a brain. So ur looking at several mil and a team of 50 people.
Re:The internet changed my life on Thursday January 20, 2022 @03:15PM (#30014124)
I could totally relate. who couldn't? Didn't that lack nuance? I'm only just past 40, and I don't take the current for granted either btw. I guess it depends what your counting in your net. Maybe we lost something.
Re:The internet changed my life on Thursday January 20, 2022 @12:33PM (#30011944)
funny you say this. i was reading about peri wigs the other day. and apparently washington didn't wear one. he fashioned his hair that way. I guess he didn't have syphilis and wanted to fit in.
Re:The internet changed my life on Thursday January 20, 2022 @12:17PM (#30011727)
It was like world of warcraft but in reality. say for example there was a rumour that someone called 'smokey' could catch an eel. and you wanted to catch an eel. someone would say. Smokey can catch eels. So you and 5 pals would walk 6 miles to find Smokey. You'd sit in the sun and he'd share his stories of how to carry out the task. Then you'd go to the said location at night and fulfill the task. etc. It was fun.
Re:The internet changed my life on Thursday January 20, 2022 @11:59AM (#30011493)
I remember the world before the internet. Full of rumour and supersition and gossip and people you go to for certian knowledge about things. Lots of people outside, all over the place. climbing trees, riding bikes. Filling the spaces. Now you come home from being on it all day working. your family are all on it. don't talk to you, bark if you interupt them. You can access all the facts and know everything. I kinda hate it. Here I am on it.
Re:Show HN: FastWSGI, an ultra-fast WSGI server for Python on Friday December 17, 2021 @05:06AM (#29590143)
Is it to do with the router?. I was reading this article.

https://www.slideshare.net/kwatch/how-to-make-the-fastest-ro...

which lead me to this code.

https://github.com/kwatch/router-sample/blob/master/minikeig...

and i was going to consider trying to benchmark different routers. I started a repo here which drops flask and uses some random router off pypi... https://github.com/byteface/fastwsgitest/blob/master/app.py

and i think i just need to merge that state machine router into it for a test. I believe it's part of the architecture for templating engine called tenjin that predates even jinja?

found your benchmark repo but not installed wrk yet to test.

I also use sphinx and https://readthedocs.org/. lots of sphinx repos are open source so you can use them for inspiration... https://www.sphinx-doc.org/en/master/examples.html
Re:Tips For Making a Popular Open Source Project in 2021 on Saturday November 13, 2021 @06:44AM (#29209142)
I enjoy what I'm making and would do it for no stars. But a star can take the edge off a bad day. Also it could lead to users, feedback, contributers.
Re:Tips For Making a Popular Open Source Project in 2021 on Saturday November 13, 2021 @05:40AM (#29208882)
I think you're right. The project changed direction several times. from being a tag generator and a general wrapper before settling on trying to port the DOM. I still need to take it beyond being a curiosity. In ways I avoid wokring on those aspects that make something 'useful' as for me it kills the drive so I work around that aspect doing all the other bits first. And end up picking up on lots of tits bits that others don't. But I should probably fill in more of the expected functionality. It's a habit I got into to keep me engaged on a project.
Re:Tips For Making a Popular Open Source Project in 2021 on Friday November 12, 2021 @12:15PM (#29201832)
I had considered but it's not quite good enough yet. I posted on reddit once and got 1 upvote and 1 comment. aha. Think it's as I did it really late on a sunday. Timing is everything. But it hepled me a lot with not stressing too much about posting.
Re:Tips For Making a Popular Open Source Project in 2021 on Friday November 12, 2021 @09:53AM (#29199800)
easy to say when you got thousands. I had to really grind for my 43 stars over 18 months and each one really made my day.

(python): https://github.com/byteface/domonic/

Older »