HNHacker News
TopNewBestAskShowJobs

dcferreira

4 karma · joined March 29, 2023

submissionscomments
dcferreira··on Western carmakers' retreat from electric risks dooming them to irrelevance
I'm curious where you got those numbers from. I did a quick search and find wildly different numbers (depending on method and source, from ~60% to >98%).

However I don't find anywhere claiming anywhere near <5%. Can you back that up?

Example source of manufacturers claiming >95% [0].

0: https://climate.mit.edu/ask-mit/how-well-can-electric-vehicl...

dcferreira··on Writing Python like it's Rust
Cool post, I've also been using more and more type hints and it really makes writing python more enjoyable. Although unfortunately it's still quite common for libraries to not have type stubs.

On the section of construction functions, I've always used/seen `@classmethod` instead of `@staticmethod`. I just had a quick look at some big python libraries (pandas, transformers), and they do use class methods. Is there any particular reason you'd want to use static methods instead?

dcferreira··on Show HN: Marvin – build AI functions that use an LLM as a runtime
> This way you can write functions that e.g. take only a URL as argument, load the content from that site, and then summarize it with the LLM.

I'm currently doing a project where this would be very helpful, but I can't think of what I'd need to send the LLM. In my case I'm scraping headlines from many news websites. I'm doing it manually with xpath currently.

What would be the way to use LLMs here? Just sending the HTML wouldn't work, as it's too many tokens. Probably I could send all <a> tags, but then how could I be sure the LLM doesn't choose too many/few?