<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: naddeo</title><link>https://news.ycombinator.com/user?id=naddeo</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Wed, 29 Apr 2026 10:45:52 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=naddeo" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by naddeo in "Shape typing in Python"]]></title><description><![CDATA[
<p>Yeah they're kind of different. I'm only really talking about TypedDicts because the original post was related to structural typing, which isn't what pydantic does. I do reach for pydantic first myself.</p>
]]></description><pubDate>Sat, 13 Apr 2024 16:55:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=40024353</link><dc:creator>naddeo</dc:creator><comments>https://news.ycombinator.com/item?id=40024353</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40024353</guid></item><item><title><![CDATA[New comment by naddeo in "Shape typing in Python"]]></title><description><![CDATA[
<p>I was surprised to see the example in the blog. Python actually has come pretty far with types but the blog's example doesn't really highlight it. For structural static typing, something like this is nicer as an example<p><pre><code>    from typing import Protocol, Tuple, TypedDict


    class Foo(TypedDict):
        foo: str
        bar: int
        baz: Tuple[str, int]
        baaz: Tuple[float, ...]


    class Functionality(Protocol):
        def do(self, it: Foo): ...


    class MyFunctionality: # not explicitly implemented
        def do(self, it: Foo): ...


    class DoIt:
        def execute(self, it: Foo, func: Functionality): ...


    doit = DoIt().execute({ # Type checks
        "foo": "foo",
        "bar": 7, 
        "baz": ("str", 2), 
        "baaz": (1.0, 2.0)}, MyFunctionality())

</code></pre>
Protocols and TypedDicts let you do nice structural stuff, similar typescript (though not as feature complete). Types are good enough on python that I would never consider a project without them, and I work with pandas and numpy a lot. You change your workflow a little bit so that you end up quarantining the code that interfaces with third-party libraries that don't have good type support behind your own functions that do. There are other pretty cool type things as well. Python is definitely in much better shape than it was.<p>Combine all of that with Pyright's ability to do more advanced type inference and its like a whole new language experience.</p>
]]></description><pubDate>Sat, 13 Apr 2024 15:48:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=40023903</link><dc:creator>naddeo</dc:creator><comments>https://news.ycombinator.com/item?id=40023903</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40023903</guid></item><item><title><![CDATA[New comment by naddeo in "Booty: A language and CLI for bootstrapping new system setup"]]></title><description><![CDATA[
<p>It looks like it's just an alternative python run-time that's small. Seems like the kind of thing you would use for specific resource constrained projects.<p>I don't think it makes sense for me here though. I wouldn't want people to have to learn about an alternative python distribution just to use the CLI, and 10mb isn't that big all things considered. Is rather have fewer apparent dependencies. I don't see anything about generating small executables with it yet from my search.</p>
]]></description><pubDate>Fri, 22 Dec 2023 14:56:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=38734706</link><dc:creator>naddeo</dc:creator><comments>https://news.ycombinator.com/item?id=38734706</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38734706</guid></item><item><title><![CDATA[New comment by naddeo in "Booty: A language and CLI for bootstrapping new system setup"]]></title><description><![CDATA[
<p>Long time lurker, fish time share-er<p>I'm really into programming languages and DSLs so whenever I get the chance to solve an actual problem with one I jump on it. In this case, I'm trying to automate the setup of my personal computers. In the past, I've done this with a combination of scripts and Makefiles. I've also attempted to create a language for this in the past that fell short (naddeoa/systemconf on github).<p>I'm liking the UX and functionality of this so far and thought I'd share it for some feedback, and for anyone else who might want to use it. I don't have it building for Windows atm (sorry), but you can `pip install booty-cli` or download one of the binaries (built with pyinstaller) from the Github release page. I don't have a Mac either so I wouldn't mind anyone testing out the Mac binaries and letting me know if they're ok. Especially the arm one.<p>Some tech details:
- The logo was made with DALE via chat gpt, which I'm pretty impressed with actually.
- The language is defined using Lark. The repo has the grammar in the grammar.py file.
- I use networkx for some dependency resolution logic, which I kind of regret. It's a fine library but its a bit overkill for what's basically a breadth-first-search.
- It's all written in Python. I might look at rewriting this in Rust at some point because the pyinstaller binaries are quite large (10mb), and I assume that would be a few hundred kb at worst in Rust, which could be important for this kind of tool since you want to do as little as possible to a fresh install before running `booty`.
- The terminal recording in the readme uses the awesome tool asciinema, which I love.<p>And yeah, I named it booty because it bootstraps.</p>
]]></description><pubDate>Thu, 21 Dec 2023 23:43:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=38728796</link><dc:creator>naddeo</dc:creator><comments>https://news.ycombinator.com/item?id=38728796</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38728796</guid></item><item><title><![CDATA[Booty: A language and CLI for bootstrapping new system setup]]></title><description><![CDATA[
<p>Article URL: <a href="https://github.com/naddeoa/booty">https://github.com/naddeoa/booty</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=38728795">https://news.ycombinator.com/item?id=38728795</a></p>
<p>Points: 3</p>
<p># Comments: 3</p>
]]></description><pubDate>Thu, 21 Dec 2023 23:43:55 +0000</pubDate><link>https://github.com/naddeoa/booty</link><dc:creator>naddeo</dc:creator><comments>https://news.ycombinator.com/item?id=38728795</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38728795</guid></item></channel></rss>