HNHacker News
TopNewBestAskShowJobs

kh_hk

1,163 karma · joined December 2, 2012

"Not craftsmen, my lord," he said. "I have no use for people who have learned the limits of the possible."

    ― Terry Pratchett, The Last Hero
submissionscomments
kh_hk··on Creating the Longest Possible Ski Jump in “The Games: Winter Challenge”
Same as op. My joystick could automate both fire and opt button
kh_hk··on Rethinking DOM from first principles
so do you stringify all your state?
kh_hk··on PHP 8.5 adds pipe operator
one can dream but i wouldn't keep high hopes. I feel functional patterns are left as second class citizens in python.
kh_hk··on Ask HN: What's Your Useful Local LLM Stack?
There's nothing old school / cool kids about uv and pip. uv is a pip/venv/... interface. If you know how to use pip and venv, you know how to use uv. I use it as a useful toolchain to circumvent missing project/setup.py/requirements shenanigans
kh_hk··on Astro is a return to the fundamentals of the web
Well I don't see other frameworks besides lit advocating for web components
kh_hk··on Code and Trust: Vibrators to Pacemakers
Weird, after the fix vibrator sleeps the longer it is used. Also, at some point it burst into flames
kh_hk··on Astro is a return to the fundamentals of the web
It breaks the third wall.
kh_hk··on Astro is a return to the fundamentals of the web
Setting `client:load` and `client:visible` for (svelte) islands you want to run on the client ends up inlining script type modules all around the html. It looked like a big hack to me.

On the positive side their use of web components is a nice bet.

kh_hk··on Astro is a return to the fundamentals of the web
To me no, it's not. It works well for some of the use cases, but if all you needed was offline rendering of your js in a build step to generate static html then you really didn't need all that js to begin with. islands work until they don't, and a lot of stuff gets inlined too. I guess it's fine if you stop caring about the final build.

I feel a lot of the hype around Astro has more to do with vite than anything else. And there yes, without doubt, vite is amazing.

kh_hk··on Switching Pip to Uv in a Dockerized Flask / Django App
Just generate a requirements.txt with uv, ship that with docker, and then there's no need for all this dance
kh_hk··on Remove Bug Bounty Program
I think AI assisted, but in the end it was human laziness that submitted these reports
kh_hk··on Rendering Crispy Text on the GPU
This is a good resource and looks very well written. Many thanks for sharing!
kh_hk··on Ask HN: What cool skill or project interests you, but feels out of reach?
CNC machining and 3D graphics
kh_hk··on Real TikTokers are pretending to be Veo 3 AI creations for fun, attention
Humans serving the algorithm. If we stretch the definition of AI creation, I think we could give this a pass.
kh_hk··on Remarks on AI from NZ
Neal Stephenson is not any sci-fi writer. He's written (and reflected) at length about crypto, VR and the metaverse, ransomware, generative writing, privacy and in general early tech dystopia.

Since he has already thought a lot about these topics before they became mainstream, his opinion might be interesting, if only for the head start he has.

kh_hk··on The X220 ThinkPad Is the Best Laptop in the World
x60 all the way
kh_hk··on Anubis saved our websites from a DDoS attack
Client side proof of work might be enough now but it won't last: solve challenge, reuse cookie.

Ja4 fingerprinting is a new-ish in interesting approach, not for blocking but as an extra metric to validate trust on requests

kh_hk··on Internet in a Box
Thanks! That makes me feel better
kh_hk··on Internet in a Box
And yet there's neither mention of projects over https://www.prepperdisk.com/pages/about-us
kh_hk··on Internet in a Box
Seeing the demo I noticed it looks like this "prepper disk" that was submitted days ago https://news.ycombinator.com/item?id=43790409

Makes me think the prepper disk was maybe a rebrand of internet in a box without proper attribution?

kh_hk··on Geocoding APIs compared: Pricing, free tiers and terms of use
MaxMind's GeoIP?
kh_hk··on Kermit: A typeface for kids
only microsoft, on their design blog no less
kh_hk··on Photo calorie app Cal AI was built by two teenagers
Funnily enough, it keeps inventing different excuses to come up with a particular number that is more or less consistent :)

On other tries of the same prompt it happily adds oil, but miscounts other parts

kh_hk··on Photo calorie app Cal AI was built by two teenagers
Recently I have started running dish descriptions through deepseek-r1:8b to give a rough estimate on calories and it is sufficient, at least for my cooking. Of course this will hallucinate on complex cases, and arguably simple dishes are easy to count. Still, counting by hand is tedious compared.

I am happy with a rough number on a dish, I do not need precision to know if I am not eating enough calories. Note there are errors on the result and reasoning, but still this dish should be around the ballpark of 500 cal. I figure running this through a larger model might be more accurate. I wondered if maybe I wanted to create an app for that, but I am happy not to.

Yes, simple descriptions could be parsed with NLP, and yes, calories could be inferred with a database.

    >>> Calorie count of a dish that has: rice, broccoli, two pieces of turkey, and a fri
    ... ed egg. Assume this is a normal portion, for instance, there are 80g of rice.. Re
    ... turn the result in a json structure
    <think>
    Alright, so I need to figure out the calorie count for a dish that includes
    rice, broccoli, two pieces of turkey, and a fried egg. The user mentioned it's
    a normal portion, like 80g of rice. Hmm, okay, let me break this down step by
    step.
    
    First, I should find out how many calories are in each ingredient separately.
    Let's start with the rice. Rice is a common staple, so I think 80g of cooked
    rice has about 130 calories. I've seen that number before, but I should
    double-check to make sure it's accurate.
    
    Next up is broccoli. Broccoli is pretty low in calories, right? A portion of
    around 100g should be about 25-30 calories. Wait, maybe a bit more if it's raw
    or cooked differently, but I think for this purpose, 35 calories is reasonable.
    
    Then there are two pieces of turkey. Turkey can vary based on the cut and
    whether it's cooked. Let's assume these are regular chicken breast slices, each
    around 50g. Each slice would have about 110 calories, so two pieces would be
    around 220 calories. But I should make sure that I'm not confusing turkey with
    another type of meat. Turkey does tend to be a bit higher in calories than
    chicken sometimes, but 110 per slice seems right.
    
    Lastly, the fried egg. A single fried egg is usually about 140-150 calories
    depending on how it's made. Since there's just one egg, that's around 140
    calories. I think that's correct because yolks add a good number of calories
    due to fat content.
    
    Now, adding all these up: rice (130) + broccoli (35) + turkey (220) + egg
    (140). Let me sum them: 130 plus 35 is 165, plus 220 makes 385, and then plus
    140 gives 525. So the total would be around 525 calories.
    
    Wait a second, maybe I should consider if there are any other ingredients or
    whether portions were different. For instance, sometimes turkey portions can be
    larger or smaller depending on the meal. But since it's specified as two
    pieces, each at about 50g, that seems okay.
    
    Also, considering preparation methods: fried egg might have more calories if
    it's done in a certain way, but I think one fried egg is standard. Broccoli's
    calorie count could vary slightly, but for simplicity, the 35 seems fine.
    
    Is there any chance I'm missing something? Maybe adding spices or sauces, but
    unless specified, I shouldn't assume that. So the total should be around 525
    calories in a normal portion as described.
    </think>
    
    ```json
    {
      "calories": {
        "rice": 130,
        "broccoli": 35,
        "turkey": 220,
        "fried egg": 140,
        "total": 525
      }
    }
    ```
kh_hk··on Python lock files have officially been standardized
Very personal nitpick, but I don't like prefixing things with py, it makes no sense to me. A lock is a lock, so why a pylock.toml and not a lock.toml? You do what you want with it. Same with pyproject.toml
kh_hk··on Devs say AI crawlers dominate traffic, forcing blocks on entire countries
Proof of work is sufficient (although easy to bypass on targeted crawls) for protecting endpoints that are accessed via browsers, but plain public APIs have to resort to other more primitive methods like rate limiting.

Blocking by UA is stupid, an by country kind of wrong. I am currently exploring ja4 fingerprints, that together with other metrics (country, Arn, block list), might give me a good tool to stop malicious usage.

My point is, this is a lot of work, and it takes time off the budget you give to side projects.

kh_hk··on Devs say AI crawlers dominate traffic, forcing blocks on entire countries
There are ip blocklist. Ranging from free, to paid, from text files to apis. Some of the sites offering IP blacklists also need to protect themselves from automated crawls too. It all goes full circle
kh_hk··on 4o Image Generation
If that's so then there's no need to be hyperbolic about it. Why would they publish a model that is not their most advanced model?
kh_hk··on 4o Image Generation
If you could _effortlessly_ eliminate any word you mean?
kh_hk··on 4o Image Generation
No, but I think they stopped with "our most" (since all other brainless corps adopted it) and just connect adjectives with dots.

Hotwheels: Fast. Furious. Spectacular.

← PreviousPage 3 of 14Next →