305 points · by pjacotg · 3mo ago · 60 comments
""" I know some people don’t like AI. Without it, this book wouldn’t exist. The book is free, so if AI bothers you more than the resulting product might benefit you, please ignore this book.
Using Claude made me realize how many compromises I’ve made on books in the past. I would get a good idea about something (for example, automatically interleaving commented output in the listings). I either couldn’t implement it, or it seemed too hard, so I didn’t do it. But with AI I can explore and often implement every whim, from things as seemingly straightforward as inserting a new chapter to ones as daunting as that commented-output system. The result is much better than anything I managed before. I keep going until I’ve tweaked everything that occurs to me. """
I had a powerful misreading. I thought the author was saying they used AI to help write chapters they had struggled with before (uh? Yea, it seemed strange for the author of a Python book having trouble with Python…). How about writing custom chapters on request? Surely something that AI can do without trouble. At the right price point I would love a non-linear reading of the book and all that’s necessary for my to understand finally how hooks and callbacks work.
But both the license terms (CC BY-NC-ND 4.0) and the repo's LICENSE.md appear to agree that distributing the epub is OK.
Unfortunately since I modified the cover image (I ended up resizing it) I don't think I'd be allowed to distribute my EPUB file.
If the people here comment on it, the author might be inclined to add this.
> The history of programming is a history of scaling barriers. Each time, the pattern is the same. Something the programmer tracks by hand works fine in small programs. Systems grow until hand-tracking fails. The solution moves that tracking into the language or the toolchain, and a generation later, nobody can imagine doing it by hand. […] Effects are the barrier we are inside right now, which is why it is hard to see.
Java has much improved though. Slow improvements, probably in part due to Kotlin, but it has gotten better since then. Even though I still think it is needlessly too verbose.
But that version seems to have some remnants left from Java version of the book, such as talking about visibility modifiers in the testing chapter.
That's a bit weird, Python 3.15 isn't even fully released yet.
""" After the first beta, no new features can go in, but feature fixes (including significant changes to new features), bug fixes, and security fixes are accepted for the upcoming feature release. """
So it's a fairly well known target. Bruce Eckel published the first edition of this book a quarter of a century ago - he has a pretty good handle on the progression of Python.
Definitions and status for all releases is at https://devguide.python.org/versions/
Instead of jumping through all this hoops with Python, it's probably easier to write Rust from the beginning instead, because then you won't have to deal with the FFI complexity between Rust and Python at all.
[1] https://nocomplexity.com/documents/pythonbook/bookreferences...
Since 2020 the entire Python ecosystem is a tightly organized, hierarchical structure that only serves the old boys country club to keep their overpaid positions in the industry. Many of these are mediocre, they just rule, let external people do real and hard work and then take the credit.
Any dissent is squashed, the official authorities have no qualms about lying and controlling the infrastructure so that no dissent can he heard.
It won't change since their inflated salaries depend on it, unless corporations catch on and fire them (like Google did).
Supplementary reading:
https://zedshaw.com/blog/2020-10-07-authoritarianism-of-code...
https://www.fast.ai/posts/2020-10-28-code-of-conduct.html
https://chrismcdonough.substack.com/p/the-shameful-defenestr...
Better invest in learning a language with multiple implementations like C++. Heck, even Java/Oracle are more democratic than Python.
I guess maybe it's a time marches on thing and the leadership serves a very different community than the one I remember. Which is fine if that's what's happening. But I'm not entirely convinced that that is the extent of the story.
There are only three C++ implementations left and one of them is Windows-only.
As someone who has spent a little too much of their life having to deal with one cross-implementation C++ incompatibility or another, all I have to say is "good luck with that."
> Since 2020 the entire Python ecosystem is a tightly organized, hierarchical structure that only serves the old boys country club
Python leadership isn't great, but again to compare it to c++ at least they're not defending and keeping around a convicted rapist and possessor of CSAM.
When I feed it into an LLM, do you think it's going to improve the output of the code, or will it need additional prompting?
And then heavily edited by the author, over several iterations. There is no auto-update to create something similar.
Especially if it gives us an insight into what prompts were given to generate something we approve of vs. something we disapprove.
yeah - you might say - you no longer code by hand. but you still need to know how to code properly and use the right idioms.
otherwise you r building pies in the sky.
"What if it goes wrong?" -- LLMs are already better at debugging than they are at writing code in the first place. They're also already better than all the software engineers I know.
For eg. If you're generating a whole document with a single prompt, say "write a document on how to implement this"
vs.
"Find various approaches to implement this. These are the approaches we already have. These are the constraints we currently have."
Then verify the generated text, remove useless hallucinations. Use the same AI to verify the generated output.
For example, if you say 'write a blog post automatically,' it tends to produce low-density, verbose text. But if you say 'find counterexamples based on this paper and that paper,' it generates highly dense sentences.
Always I ask the LLM to drop the prose and reduce the content by 60%. And it does. Then I go, and edit manually, and often trim it almost twice on top of that.
LLMs are professional bullshitters. Like real organic bullshitters they will mask the lack of real understanding with prose decorations.
For others, sure, both “AI” and “slop" narrow rhe scope compared to the other one used alone.
You know we live in a fallen world because R4RS existed when JS was invented. Can you imagine a world where the browser was scripted in Scheme?
Except that everything needs to be reified into a top-level class with a unique name, even if it's just a piece data that you pass into/return from a single function. Also whitespace matters.
I'm not sure if I would call whitespace-as-syntax arbitrary, though it is opinionated. I admit though that for me it started feeling like a time saver once I got over my anti whitespace as syntax zealotry.