home.social

Search

286 results for “YesJustWolf”

  1. Today I successfully wrote a #Rust implementation using #PyO3 that served as a package in my #Python program. Part of a presentation I’m doing for @mug. It’s day 1 of Advent of Code. I wrote four Python versions progressing from the simplest thing you would reasonably write up to packages and Rust. Here’s [the repo](github.com/MichiganUnixUserGro). Lots of people in this repo demoing lots of languages. My stuff lives at `code\Python\wolf`

  2. I’ve been writing a lot of #Python and #rust together over the last week or so, and I have things to say about that.

    * even though I’ve been using Python for decades; when working in two languages at the same time I have to keep double-checking the syntax on _both_

    * wow! Python can be a lot more succinct than Rust

    I really like them both very much. Neither one is a replacement for the other. I’m a huge fan of types. The bigger your plans, the more important types are. They’re required in Rust, but I always use the in Python, too.

    #PyO3 has proven to be incredible, though I still have so much to learn. What an amazing way to combine the two tools. Thanks. #mainmatter for leading me to this path.

  3. I just attended a two-day workshop on #rust-#Python interoperability (the main glue between the two was #PyO3). Run by @mainmatter. The instructor was @algo_luca Two days, four hours each. Speeding up big Python programs with little bits of Rust. I enjoyed every second of it. Luca either knew the answer to your question off the top of his head or he was willing to dig right then to find it. The exercises were good as well as deep; the instruction was effective, smart, and respectful; the results were exciting. I learned a lot. I would happily attend another event of the same caliber.

    Edit: originally I mistakenly said Mattermost. I meant to say Mainmatter. Thanks for pointing that out.

  4. Let's say you want to do good type-checking for the #Python project you're working on. You pick a tool, maybe you use it as an #LSP also (so your editor can show you errors, too). As an example, I'm using #Ty at the moment. There's three places this might be installed: globally (e.g., `brew install ty`), as a dev-only dependency inside your project (e.g., `uv add --dev ty`), or -- and this one might surprise you -- it might only be used and installed by `pre-commit`, which builds a separate environment for each needed tool (which is great for instance where I use `codespell` as a `pre-commit` check, which seems to need some higher version of Python than my actual project).

    Where should you install it?

    If you're the only one on your team running it, globally is fine. If more than just you, then absolutely as a dev-only dependency inside your project ... and **maybe** globally as well.

    The only real problem is updates. If you use a reasonable global install scheme, updates will be easy. They're less easy inside your project or in `pre-commit`. And you might care one way or the other! I **don't** want updates! I **do** want updates!

    As for Python type-checking, `ty` seems good so far, but not enough experience with it yet. `basedpyright`, `pyrefly`, and `ruff` all good. These four are my favorites.

    #BasedPyright #Pyrefly #Ruff #PreCommit #CodeSpell #Homebrew

  5. Let's say you want to do good type-checking for the project you're working on. You pick a tool, maybe you use it as an also (so your editor can show you errors, too). As an example, I'm using at the moment. There's three places this might be installed: globally (e.g., `brew install ty`), as a dev-only dependency inside your project (e.g., `uv add --dev ty`), or -- and this one might surprise you -- it might only be used and installed by `pre-commit`, which builds a separate environment for each needed tool (which is great for instance where I use `codespell` as a `pre-commit` check, which seems to need some higher version of Python than my actual project).

    Where should you install it?

    If you're the only one on your team running it, globally is fine. If more than just you, then absolutely as a dev-only dependency inside your project ... and **maybe** globally as well.

    The only real problem is updates. If you use a reasonable global install scheme, updates will be easy. They're less easy inside your project or in `pre-commit`. And you might care one way or the other! I **don't** want updates! I **do** want updates!

    As for Python type-checking, `ty` seems good so far, but not enough experience with it yet. `basedpyright`, `pyrefly`, and `ruff` all good. These four are my favorites.

  6. Let's say you want to do good type-checking for the #Python project you're working on. You pick a tool, maybe you use it as an #LSP also (so your editor can show you errors, too). As an example, I'm using #Ty at the moment. There's three places this might be installed: globally (e.g., `brew install ty`), as a dev-only dependency inside your project (e.g., `uv add --dev ty`), or -- and this one might surprise you -- it might only be used and installed by `pre-commit`, which builds a separate environment for each needed tool (which is great for instance where I use `codespell` as a `pre-commit` check, which seems to need some higher version of Python than my actual project).

    Where should you install it?

    If you're the only one on your team running it, globally is fine. If more than just you, then absolutely as a dev-only dependency inside your project ... and **maybe** globally as well.

    The only real problem is updates. If you use a reasonable global install scheme, updates will be easy. They're less easy inside your project or in `pre-commit`. And you might care one way or the other! I **don't** want updates! I **do** want updates!

    As for Python type-checking, `ty` seems good so far, but not enough experience with it yet. `basedpyright`, `pyrefly`, and `ruff` all good. These four are my favorites.

    #BasedPyright #Pyrefly #Ruff #PreCommit #CodeSpell #Homebrew

  7. Let's say you want to do good type-checking for the #Python project you're working on. You pick a tool, maybe you use it as an #LSP also (so your editor can show you errors, too). As an example, I'm using #Ty at the moment. There's three places this might be installed: globally (e.g., `brew install ty`), as a dev-only dependency inside your project (e.g., `uv add --dev ty`), or -- and this one might surprise you -- it might only be used and installed by `pre-commit`, which builds a separate environment for each needed tool (which is great for instance where I use `codespell` as a `pre-commit` check, which seems to need some higher version of Python than my actual project).

    Where should you install it?

    If you're the only one on your team running it, globally is fine. If more than just you, then absolutely as a dev-only dependency inside your project ... and **maybe** globally as well.

    The only real problem is updates. If you use a reasonable global install scheme, updates will be easy. They're less easy inside your project or in `pre-commit`. And you might care one way or the other! I **don't** want updates! I **do** want updates!

    As for Python type-checking, `ty` seems good so far, but not enough experience with it yet. `basedpyright`, `pyrefly`, and `ruff` all good. These four are my favorites.

    #BasedPyright #Pyrefly #Ruff #PreCommit #CodeSpell #Homebrew

  8. Well … I get symbol renaming if I use as my

  9. Here’s something that puts your readline edit-mode into your prompt. I probably didn’t need to do this. I’m a #Vim user (really #NeoVim) and so I have a `.inputrc` that makes my #commandline edit-mode (because of #readline) always be #vi. This is for #bash. It may work in other shells, I don’t know. I use #starship. The actual command I wrote uses #ripgrep. At least twenty other ways you could do it. I put all the changes into a gist: gist.github.com/wolf/e2bd12615

    Most people never change from the default edit-mode. If they do, they probably don’t switch back and forth. Starship narrows the field further. Almost certainly this is of no use to you unless you want to learn a little about some of the pieces. Enjoy anyway.

  10. When I was a child, I thought the world had things that were true and things that were false, i.e., things were "black and white".

    Things happened to me, including reading "Gödel, Escher, Bach: an Eternal Golden Braid" #Godel #GodelEscherBach, and I realized "Oh! There’s a gray area! (and not only that, the very edges of the gray area are fuzzy!"

    And then I learned about #Bayes (and #Laplace) and realized: "Oh shit! It’s **all** gray!"

    It feels like you **know** some things to be true because have assigned them such high probabilities. So high, they seem certain. Sorry. It’s not actually 1. And always remember: probability is what you **know**; reality is outside of that (just like "is your blue the same as my blue?"). Yes! Your model is good enough to navigate the world and make good decisions; but absolutely don’t confuse that with having no room left to learn.

    I know I said this in a weird way, but keep growing.

  11. When I was a child, I thought the world had things that were true and things that were false, i.e., things were "black and white".

    Things happened to me, including reading "Gödel, Escher, Bach: an Eternal Golden Braid" #Godel #GodelEscherBach, and I realized "Oh! There’s a gray area! (and not only that, the very edges of the gray area are fuzzy!"

    And then I learned about #Bayes (and #Laplace) and realized: "Oh shit! It’s **all** gray!"

    It feels like you **know** some things to be true because have assigned them such high probabilities. So high, they seem certain. Sorry. It’s not actually 1. And always remember: probability is what you **know**; reality is outside of that (just like "is your blue the same as my blue?"). Yes! Your model is good enough to navigate the world and make good decisions; but absolutely don’t confuse that with having no room left to learn.

    I know I said this in a weird way, but keep growing.

  12. When I was a child, I thought the world had things that were true and things that were false, i.e., things were "black and white".

    Things happened to me, including reading "Gödel, Escher, Bach: an Eternal Golden Braid" , and I realized "Oh! There’s a gray area! (and not only that, the very edges of the gray area are fuzzy!"

    And then I learned about (and ) and realized: "Oh shit! It’s **all** gray!"

    It feels like you **know** some things to be true because have assigned them such high probabilities. So high, they seem certain. Sorry. It’s not actually 1. And always remember: probability is what you **know**; reality is outside of that (just like "is your blue the same as my blue?"). Yes! Your model is good enough to navigate the world and make good decisions; but absolutely don’t confuse that with having no room left to learn.

    I know I said this in a weird way, but keep growing.

  13. When I was a child, I thought the world had things that were true and things that were false, i.e., things were "black and white".

    Things happened to me, including reading "Gödel, Escher, Bach: an Eternal Golden Braid" #Godel #GodelEscherBach, and I realized "Oh! There’s a gray area! (and not only that, the very edges of the gray area are fuzzy!"

    And then I learned about #Bayes (and #Laplace) and realized: "Oh shit! It’s **all** gray!"

    It feels like you **know** some things to be true because have assigned them such high probabilities. So high, they seem certain. Sorry. It’s not actually 1. And always remember: probability is what you **know**; reality is outside of that (just like "is your blue the same as my blue?"). Yes! Your model is good enough to navigate the world and make good decisions; but absolutely don’t confuse that with having no room left to learn.

    I know I said this in a weird way, but keep growing.

  14. There’s a strong urge to believe what you wish instead of what you can prove. Computer rumors are a great example. Many rumors have no basis other than being a feature someone wants. They call it "wish casting".

    We want the world to be black and white. Some given statement is either true or false. But it’s not. Gödel #Godel describes at least three states: true, false, and unprovable (e.g., the statement "This statement is false". Can’t be true or false; it’s unprovable. Maybe there’s a better name.)

    But it’s worse than that.

    In science, a theory isn’t true … it’s just the best explanation we have so far. The whole endeavor of science is to keep finding better explanations. To make good decisions you don’t need the absolute best explanation, just one good enough to guide you to beneficial choices. (I said "prove" before, but to be more accurate I should be talking not about what you can prove, but about what you can’t disprove.)

    #Bayes (really #Laplace) says a given notion isn’t true, it’s actually true-with-some-probability. Each new thing you observe impacts that #Probability. This is the actual math behind the #ScientificMethod. And it’s the truth of the world. Your beliefs must adapt to your observations, constantly, forever.

    If you have unshakable faith in some set of "facts", you’re probably doing it wrong. Even when you’re right, you could be righter.

    Of course, if you don’t adjust your beliefs with new input, if you don’t test, if you have "facts" instead of "very probable theories". If you believe things because of how strongly the person who convinced you believed instead of what they could actually show you. If you believe simply because that’s what your parents taught you. Then, well, you **might** be right (even a stopped clock is right twice a day). But at best you’re not going to make good decisions for yourself, and at worst you’re going to try to tell others what to do based on an inaccurate understanding.

    It’s messy; and that’s just how it is.

  15. There’s a strong urge to believe what you wish instead of what you can prove. Computer rumors are a great example. Many rumors have no basis other than being a feature someone wants. They call it "wish casting".

    We want the world to be black and white. Some given statement is either true or false. But it’s not. Gödel describes at least three states: true, false, and unprovable (e.g., the statement "This statement is false". Can’t be true or false; it’s unprovable. Maybe there’s a better name.)

    But it’s worse than that.

    In science, a theory isn’t true … it’s just the best explanation we have so far. The whole endeavor of science is to keep finding better explanations. To make good decisions you don’t need the absolute best explanation, just one good enough to guide you to beneficial choices. (I said "prove" before, but to be more accurate I should be talking not about what you can prove, but about what you can’t disprove.)

    (really ) says a given notion isn’t true, it’s actually true-with-some-probability. Each new thing you observe impacts that . This is the actual math behind the . And it’s the truth of the world. Your beliefs must adapt to your observations, constantly, forever.

    If you have unshakable faith in some set of "facts", you’re probably doing it wrong. Even when you’re right, you could be righter.

    Of course, if you don’t adjust your beliefs with new input, if you don’t test, if you have "facts" instead of "very probable theories". If you believe things because of how strongly the person who convinced you believed instead of what they could actually show you. If you believe simply because that’s what your parents taught you. Then, well, you **might** be right (even a stopped clock is right twice a day). But at best you’re not going to make good decisions for yourself, and at worst you’re going to try to tell others what to do based on an inaccurate understanding.

    It’s messy; and that’s just how it is.

  16. There’s a strong urge to believe what you wish instead of what you can prove. Computer rumors are a great example. Many rumors have no basis other than being a feature someone wants. They call it "wish casting".

    We want the world to be black and white. Some given statement is either true or false. But it’s not. Gödel #Godel describes at least three states: true, false, and unprovable (e.g., the statement "This statement is false". Can’t be true or false; it’s unprovable. Maybe there’s a better name.)

    But it’s worse than that.

    In science, a theory isn’t true … it’s just the best explanation we have so far. The whole endeavor of science is to keep finding better explanations. To make good decisions you don’t need the absolute best explanation, just one good enough to guide you to beneficial choices. (I said "prove" before, but to be more accurate I should be talking not about what you can prove, but about what you can’t disprove.)

    #Bayes (really #Laplace) says a given notion isn’t true, it’s actually true-with-some-probability. Each new thing you observe impacts that #Probability. This is the actual math behind the #ScientificMethod. And it’s the truth of the world. Your beliefs must adapt to your observations, constantly, forever.

    If you have unshakable faith in some set of "facts", you’re probably doing it wrong. Even when you’re right, you could be righter.

    Of course, if you don’t adjust your beliefs with new input, if you don’t test, if you have "facts" instead of "very probable theories". If you believe things because of how strongly the person who convinced you believed instead of what they could actually show you. If you believe simply because that’s what your parents taught you. Then, well, you **might** be right (even a stopped clock is right twice a day). But at best you’re not going to make good decisions for yourself, and at worst you’re going to try to tell others what to do based on an inaccurate understanding.

    It’s messy; and that’s just how it is.

  17. @sirber though we don’t use ffmpeg, we do use #Python and #qt. We compile with #pyinstaller and the result is a regular standalone binary for our users.

  18. @w4ffl35 at work we use #pyinstaller and have been happy with the results.

  19. I want #pixi to build me a vent. I’ll use it in #pycharm to start but later #pyinstaller. Pixi wants to build things. It’s mad about A which can’t be built. It’s mad about my app, down inside B. Doesn’t like that my #pyprojecttoml is not at the top of B. Doesn’t like that my app can’t be built. My virtual environment has all the external packages it needs, but isn’t working in PyCharm because it doesn’t have any of the things I need from A.

    My app _will_ be getting a repo of its own.

  20. It seems like my #Pyrefly problem isn’t related to my #AdventOfCode project. Before pyrefly, I could rename a symbol throughout the project. With pyrefly, I can’t. More investigation needed.

  21. Working on #AdventOfCode. My plan was to solve each day in both #Python and #RustLang. I thought I would be further by now. Yes, my Python answer to day 1 solves both parts, but I'm trying to be exemplary: good names, docstrings, comments-where-needed, tests, project structure, all the things.

    For some reason, #HelixEditor keeps complaining about the #LSP (using both #Pyrefly and #Ruff, as usual). I'm concerned I haven't set things up right somehow, but I don't yet see where I've gone wrong.

    Once this is working, further days will be easy. At least ... I hope!

  22. I talk a lot about #Measuring things (so one knows if one is doing the right amount of the right thing); but I don’t measure my own use of **all** apps and tools across all OSs! I have some general ideas (and I’ve often talked about how wrong general ideas often are).

    I spend most of my time on #Windows (it’s my whole workday). My personal machine is a #Mac. I’ve mentioned before that I use everything everyday. My actual work is split between #CommandLine tools (building things), running the things we’ve built, and web-stuff like document creation, tickets, and the like.

    My #TaskManagement software is Mac and iOS only: #Things from #CulteredCode.

    I like my total setup; but it’s long past time to measure! Am I doing the right amount of the right things?

  23. I see #HelixEditor is getting a built-in language (eventually, I don’t know when, and I don’t have links to information about it). The language will be a #Scheme called Steel. Steel is inspired by #RacketLang and written in Rust. I’ve written small programs in Racket and don’t much like it. I find them hard to understand when I come back to them later. Probably that’s just lack of experience. Adding a built-in language is a really good thing. Picking a Scheme is almost certainly a great choice, despite my feelings. If I do settle on Helix and if I do end up scripting it, maybe I’ll end up liking Scheme more. As far as I’m concerned, this addition to Helix can’t come soon enough.

  24. If I recall correctly, it was Akkana Peck @akkana who first introduced me to Python, probably around 1998 or 1997 (so something in the neighborhood of Python v1.5) while working together at Netscape (I had a different name back then). **That** turned out to be a life-changing event; so thanks, Akkana!

    #Python #Netscape

  25. I have found voice input to be super helpful. I use it entirely for prose: notes, tasks, and reminders. I **don't** use it to make the machine "do things" or for coding (but that's just me ... you do you; and also, I don't use it for coding **yet**).

    I currently use two tools:

    * Spokenly (phone + laptop)
    * Just Press Record (watch + phone)

    Each has advantages. Both produce transcriptions which I then "route" to the appropriate place (Things, Obsidian, Fantastical) with Sharing.

    Just Press Record also runs on my watch, so I can use it while driving or other situations where the phone is inconvenient, illegal, or unavailable. I can later look at a list and handle them one at a time or in bulk.

    Spokenly is significantly more accurate. You pick the underlying model, so you can decide if you want local-only (as I do, so no fees of any kind), size (controls memory used and speed of translation, at the cost of accuracy), and what spoken languages it knows. You can switch at will; and you don't have to have the same model on your phone as on your laptop. You typically handle results in Spokenly immediately (for a while I thought this was the only choice), but they are saved and you can look at them all in History and deal with them from there.

    I'm still playing with which models are the best balance of speed and accuracy for my use case. On my phone I'm using "Distil-Whisper Small (English Only)". On my Mac, the same but "Medium".

    This doesn't **sound** like a huge win. I certainly didn't expect much when I decided to try it. But it turns out to punch far above its weight.

    #VoiceInput #Spokenly #JustPressRecord #Things #Obsidian #Fantastical #Productivity

  26. 1/2 I played the alto #Saxophone growing up. Originally it was about being in band where all my friends were. I chose sax because it they had one and it looked easier to carrier than everything else. I sucked for at least a year. To sit next to the second chair player (a cutie) I needed to be better: move up the ranks. #Mania helped a lot. Over the summer (leading to high school) I practiced all day (meaning at least eight hours, maybe more), everyday. I played from songbooks. I played to the radio. I just played. When placement for the high school bands rolled around I ended up first chair, ahead even of the seniors. She also ended up first chair … of the concert band. I was first chair of the symphonic band. We weren’t even in the same class. (I won’t go into sitting next to the first chair French horn player, who was kind enough not to notice my crush).

    During this time I moved from playing just to manage where I was sitting to playing because I liked what I was making. The music and sound became more important to me than anything else. There were saxophone players I wanted to play like, but that’s not what I wanted to sound like. I wanted to sound like Annie Lennox, Aretha Franklin, there are new names today. I wanted to sound like a French horn. But I did want to play like some of my saxophone heroes. Near the very top, if not the top, was #JayBeckenstein, the front man for #SpyroGyra. I was well under twenty but saw him at Blossom Music Center at least once, possibly more. My friend and I devoured their music. He made me want to play the saxophone.

  27. Apparently I can write anything I want about #Guns and not get a single response, pro or con; but if I write anything about #Whitespace in #Code at all, I get immediate responses saying I’m permanently muted.