Collision detection comparison with Python and C++
In 2014 I wrote a post about mixing Python with C. At the end I said I wanted to try a comparison to show that, generally, algorithms trump language. The comparison was to have a 'game' where a lot of boxes fly around the screen and if they hit each other or the screen edge, they reverse their direction. We'd see how far we can push a C (now, I'm going to use C++) version of such a program and how far we can push a Python version, each using the same/different collision detection algorithms.I enlisted ChatGPT to help me with this. I'm quite impressed.
First I asked it: "Can you write a simple C++ program that uses SDL2 to make a bunch of simple boxes fly around the screen? If they collide with the edge of the screen they should react naturally"
See Full Post and Comments
It's incredible that ChatGPT isn't laden with ads (yet)
ChatGPT seems to be quite good at product recommendation. Furthermore, it will describe things without the usual SEO spam hype, and you can ask it if it doesn't tell you already to give comparisons in terms of pros/cons and other tradeoffs, interesting requirements many reviewers won't consider like being able to fit a console in a backpack or being such and such height, estimate price ranges...I used it to help locate and decide on a modestly priced sleeping bag and 1-person tent ($200 total), having tested them I'm a bit iffy on the sleeping bag but mostly because it's a mummy bag and I've never had one of those before; it does actually fit me (I'm pretty tall). Anyway the experience of having it find and recommend 5 different products for me to look at was a lot more pleasant than using google to find an SEO'd site that probably won't give me what I really want.
I've also had it recommend me some backpacks as I think next time I do long international travel I want to try a backpack instead of messenger back to haul around my laptop etc. Problem is it gave me like 3 good options, now it's just a me-issue in paralysis for which one to try.
See Full Post and Comments
Package-local nicknames
Got around to reading this blog post, seems like something to ramble about myself as ultimately I disagree though I like his arguments. I will now proceed to jump into the shark pool, but while in the air let me babble--First, I think if you're using the package-inferred-system style, then yes, nicknames are largely pointless. (Though not package prefixes, which I'll get to in a bit.) Most of the time it'll be fine to just :use the packages you need for that file. While in that file, you know all the symbols in use are defined at the top of the file if you're ever in doubt where they come from and don't feel like describing/hovering over the symbol or jumping to the source. Like Java, using this style also encourages to keep files relatively smaller as well, which helps keep the number of symbols at play per file relatively smaller.
I'm not a huge fan of package-inferred-system, at least in the way ADSF implemented it. Also, it seems like the linked post's main complaint isn't so much around nicknames, but around package names entirely. Their example Python code of preferring from sys import argv, exit over import sys and later using sys.argv and sys.exit suggests that to me.
See Full Post and Comments
Books
Randomly looking at old post tagged books here, a bit sad how many I still haven't read. I only read ~12 per year, but still. (Here's a list if you're curious of my thoughts on any of them, but spoilers galore.)From early 2010: never finished Probability Theory, Causality, or Purely Functional Data Structures, I only got through them to varying degrees of progress. I think I "finished" the Flex book but it was mainly useful as a reference anyway. The 2 listed for school, Sound Synthesis and a book on combinatorial game theory, I never finished cover to cover, though I passed the classes. (The sound class never used the book though...)
From late 2010: I read most of How to Read a Book but never finished. Read random bits of Judgment Under Uncertainty before giving it to a friend. Never read much of Real Time Rendering, there are newer editions now too... I did eventually read most of the others; only the first book in the Kushiel trilogy though.
See Full Post and Comments
A GPT Poem
I'm continuing to play with GPT-4 (via ChatGPT), it's both very impressive and very underwhelming. The latter I think is mostly when I feel like I'm trying to get it to do something that I think it ought to be able to do. But I also occasionally run into some of its annoying biases and content restrictions that I wish I could opt out of.It kinda sucks with poetry. At least, the poetry I like. And the poetry I like to write, which I wouldn't call good, is strange enough that it can't really emulate its style.
I was able to get it to write one decent thing so far that I rather enjoy. It's an acrostic poem:
See Full Post and Comments
Evaluating ChatGPT's speculations on the types of girls I'd be in to
I've been having a bit of fun with ChatGPT this month. This morning's fun seemed worth writing a blurb about.ChatGPT seems to know a little about me from its vast training data. After some prompting I was able to get it to generate some "types" for girls whom I might be into. (I think a use case for really good AI will be to play match-maker far better than past attempts or even ourselves can be, especially if it can be prodded into evading the privacy implications to get two people together who would never have found each other otherwise.)
Interestingly it did not use the word for what is I think the most characteristic of a singular type, which is "kind". (By my own introspection, I do have a "type", but it's hard for me to articulate, there are multiple characteristics to it, and so far only two women have appeared in my life that match it and I'd prefer to be lazy and just point to them and say "some of their overlapping commonalities could be considered my 'type'"...) Anyway, here are the AI's types, and my thoughts afterwards.
See Full Post and Comments
Paused objectives
This last month has been really unproductive for me. But it's not just last month. In some sense it's life. In some sense, it's not anything new. I'm hoping maybe if I write a bit about it again, it'll give myself a little kick for this month to make progress on a few things. And over the next several months can come back here in disgust.Mainly, here's just a list of things I've got ongoing that I've paused and want to continue and maybe actually finish some of them, with some excuses in parens. 1. Real-name website to use as a future hub for real-name business opportunities (consulting) written in CL (low effort, if I just swallowed and used PHP like this blog still is I probably would have finished in one burst, but I'm trying to do things 'proper' with logging and monitoring and...). 2. Continuing Japanese studies (brain started burning out near the end of trip and parrying new knowledge, since coming back at the end of January I've been lazy about continuing my studies that I need to continue, I made actual improvements in the last few months of 2022 that I don't want to lose). 3. Revisit and probably restart the game BGM course (I did the town theme in LMMS and started on a character theme, but stopped, and haven't gotten back to it, probably need to restart but at least I'll have all my sound packs and sound fonts still installed, they were fun to play with and learn how they work a bit). 4. Continue Blender studies (I actually finished the donut tutorial! But I need to continue with more projects to solidify the knowledge, and work on some larger ideas, and eventually do a workflow of getting something into a game engine like godot). 5. Finish a game (at this point it doesn't have to be in CL, but I've got several CL things ongoing in various states.... a solarwolf clone, a clone of my old college game (shooter), a flappy clone with the idea that it can be used to teach lisp, a pathfinding playground to add more features to my a* implementation.. and a ton of ideas that I haven't even started on yet, like a fangame, a touhou-inspired game, a 3d rail shooter inspired game... Maybe 1 and 5 can be combined into a desire to program more, generally speaking). 6. Read more (I haven't been reading enough, and what I have been reading has been fiction, and a lot of that has been 'reading' in the form of audiobooks). 7. Play more games (I haven't even been playing many games or watching shows. My days are very unproductive, even when it comes to entertaining myself). 8. Get back into drawing exercises (started Drawing on the Right Side of the Brain, paused at the chair drawing exercise). 9. Send out postcards (got the messages typed up at least now, just need to write them and send, should be done this week). 10. Pick up the guitar again (it has literally been years since strumming anything despite having 3 guitars). 11. Some neglected yardwork/indoor cleaning and repairs (I keep things relatively clean but there's a few spots that need a deeper pass with my wet vacuum, been too lazy to get it out and do all that, and my bathroom that wasn't in the best shape when we moved in needs some recaulking, and an electrical outlet needs to be replaced, and I'm probably forgetting something...some of this is technically the landlord's job, which is partly why I haven't gotten around to it). 12. Close out some browser tabs (I've really let them get out of hand this time.. so many are youtube videos too). 13. Do some serious meditation (part of a needed effort to 100% confront myself over some things I've been shying away from and staying at 80-90%, it should be like using the sword of shannara). 13. Move (even if it's more than I want to pay, I should just Do It, and maybe force myself back into working). 14. Make a robot (or stand-in for putting my CE degree towards something instead of just screwing off to pure software afterwards)
Some things I've successfully (more or less) been keeping up with or finished: 1. Lifting weights (brief pause after a back twinge but mostly back at it now). 2. Default-keto dieting (either maintaining or losing weight, not strict dieting and I got sick finally this last week so no keto at all for me, but most of the time it's easy to default to no/low carbs which is good for me when I'm not walking miles every day). 3. Made a dreamcatcher and a poem for someone I care a lot about (it involved drilling some holes in stones too, took more effort than I thought it would, but I was happy with the results, and got a thank you for it). 4. Keeping my teeth health in check (no cavities in years).
See Full Post and Comments
Recent Posts
2025-03-15
2025-03-03
2025-02-13
2025-01-14
2025-01-10