Searching txt.sour.is

Twts matching #Python
Sort by: Newest, Oldest, Most Relevant

Para conseguir pagar a minha viagem pra #PythonBrasil este ano (sendo que eu mal tou conseguindo pagar as minhas contas 😭 ) eu vou tentar vender mais canecas dessas aqui: https://umapenca.com/villares/caneca/l-system-arbusto-286376.html

Fazendo aqui perto de casa eu consigo um preço bem melhor, då pra vender a caneca por R$80 e ainda ter uma boa margem.

TambĂ©m tou querendo fazer bottons, que daria pra vender mais baratinho, tipo R$10. Mas tou muito em dĂșvida sobre quais desenhos as pessoas vĂŁo querer


​ Read More

For me, the two most “magical” things about np.arrays are:

  • Vectorized/broadcast operations, like multiplying a matrix and a scalar value & adding or subtracting two vectors or two matrices - but also any vectorized function;
  • Masking & array indexing, being able to use arrays to select positions on other arrays;
  • Bonus-third-thing: multi-dimensional arrays in general are quite magical too, if you add slicing to it, good lord, it can be quite daunting.

#Python #npArrays #NumPy

​ Read More

The #py5 #LiveCoding feature can be briefly described as a tool that runs your module mode sketch and keeps an eye on changes at the source file, updating the running sketch with changes you save from your editor/IDE.

You can use with any coding editor from the command line, or, if you use #Thonny IDE you could help me test this experimental version of the thonny-py5mode plug-in!

https://discourse.processing.org/t/using-py5s-live-coding-feature-on-thonny-ide/48967

#CreativeCoding #Processing #Python #ComputingEducation

​ Read More

The #py5 #LiveCoding feature can be briefly described as a tool that runs your module mode sketch and keeps an eye on changes at the source file, updating the running sketch with changes you save from your editor/IDE.

You can use it with any coding editor, invoking it from the command line, or, if you use #Thonny IDE you could help me test this experimental version of the thonny-py5mode plug-in that adds a Live Coding mode!

https://discourse.processing.org/t/using-py5s-live-coding-feature-on-thonny-ide/48967

#CreativeCoding #Processing #Python #ComputingEducation

​ Read More

I think it is safe to argue that a lot of #Python’s success is derived from it being adopted early by end-user programmers, both in and out of the broad scientific community. We got the numeric computation infrastructure, then astronomers, computational linguistics folks, computer vision buffs, pioneering data journalists, the type design crew (Guido’s brother, wink wink), the list goes on and on.

If I were a retired person with time and money to spare I would start a “Python scientific and end-user programmers association” to advocate for the interests of people who use Python not as professional developers. We could fund a well designed “Python census” that would probably show we are more numerous than the professional developers (instead of the stupid JetBrains survey). Also, I hope we wouldn’t be funded by big corps and would be able to criticize them freely.

​ Read More

I don’t like using Instagram and I was happy that maybe I could automate posting my daily sketches there using a #python script with the #instagrapi library.
I tried posting a single image as a test yesterday and it worked great in the first attempt, yay! :)
Today my account was blocked as Meta figured my account might have been invaded! :(
So there goes my excitement about automated posting on Instagram


​ Read More

Why.

Python’s numeric types complex, float and int are not subtypes of each other, but to support common use cases, the type system contains a straightforward shortcut: when an argument is annotated as having type float, an argument of type int is acceptable; similar, for an argument annotated as having type complex, arguments of type float or int are acceptable.

https://typing.python.org/en/latest/spec/special-types.html#special-cases-for-float-and-complex

​ Read More
In-reply-to » I trip over this in our code at work all the time.

@movq@www.uninformativ.de The nice thing about properties is that you can compute and cache things on the fly at first attempt and also ensure validation for writing. But like you said, since it’s not obvious that reading or writing might do some more things, it’s strongly advised to avoid doing expensive stuff disguised as properties.

I reckon the vast majority of property use cases is to provide read-only access. At least that was my impression when I was doing a lot more in Python.

Personally, I think that this just reads a lot nicer:

oink.my_property
oink.my_property = 42

Than:

oink.get_my_property()
oink.set_my_property(42)

Btw, any field access is implemented using method calls. I might be wrong, but I believe there’s always __getattr__ and __setattr__ involved. 8-)

​ Read More

I trip over this in our code at work all the time.

Python has this concept of “properties”:

class Oink:
    def __init__(self):
        self._foo = 3

    @property
    def my_property(self):
        return self._foo


a = Oink()
print(a.my_property)

my_property() is a method but it can be used as if it were a field.

This can also be used to define a setter:

class Oink:
    def __init__(self):
        self._foo = 3

    @property
    def my_property(self):
        return self._foo

    @my_property.setter
    def my_property(self, value):
        self._foo = 123 * value

Because, for some reason, Python people don’t like getters and setters. Instead, they hide it behind a property.

The result is, when you read this:

a.my_property = 5
print(a.my_property)

You have no idea that this actually calls a method.

​ Read More
In-reply-to » (Just a brain dump, nobody needs to read this.)

@movq@www.uninformativ.de My grief with Java is that it’s sooo verbose. Sure, all the enterprise garbage makes it a hell lot more terrible, but even regular Java feels always so lengthy. And back in the days when I was using it daily, I missed so many convenient things in the stdlib after having experienced Python’s “batteries included”. Not sure if or how recent Java versions caught up.

​ Read More

I really think I should go back to Java.

Writing programs in Python is so exhausting. I want a compiler and I want static typing. No, linters and type checkers and IDEs are not good enough. Compilers catch way more errors in advance.

Rust is also exhausting. They’re constantly adding language features and, at the same time, the runtime library remains tiny and you need 3rd party libraries for everything. Many of those are still at version 0.x (SemVer!) and you can’t rely on anything. Often times, you need the latest Rust nightly compiler.

Go is 
 I don’t like it. And huge binaries.

I like C as a language, but it’s too fragile. I want to have a proper HashMap every now and then.

None of the above have good GUI libraries, at least not on Linux.

And then there’s Java. This is my fractal renderer that I wrote over 17 years ago:

https://movq.de/v/fcd3c4e557/vid-1784121825.mp4

It’s fast. It has a GUI with custom widgets and those weren’t even hard to make. It still works without changing a single line of code. The source code files have timestamps from 2009 and I just noticed that the JAR file I’m using in the video was compiled in 2010.

Java as a language is relatively easy to learn and to master. There are few surprises. The source code organization with packages is good. Java API docs are clear and well written.

The JVM ramp-up times have improved considerably:

https://movq.de/v/e7314e521e/vid-1784121998.mp4

This isn’t like the Dark Ages anymore. Might even be usable for some CLI tools.

The only thing where Java really sucks is anything close-ish to the kernel. Try issuing an ioctl() 
 I couldn’t have made my TUI framework in Java, but then again, I wouldn’t have needed to because Swing already exists and it just works.

​ Read More
In-reply-to » Numbered headings in blog posts, yay or nay?

@lyse@lyse.isobeef.org Besides, have a look at

Image

again: When it goes from item 9 to item 10, the indentation of the text (after the number) changes. Pretty ugly. In other words, a table of contents should be a table, not a list like it is at the moment. And that would require me to write my own extension for python-markdown 
 Probably not worth it.

​ Read More
In-reply-to » @lyse Mhm, yeah, I also think I like date := time.Date(2026, time.June, 19, /**/ 17, 0, 0, 0, time.UTC) the most. đŸ€” (My only gripe with this is that it isn’t obvious whether the third 0 is milli-, micro- or nanoseconds. These days it’s probably nanoseconds, but you never know.)

@movq@www.uninformativ.de Right. A Go programmer eventually knows that its nanoseconds precision. Keyword arguments like in Python are just sooo superior to unnamed positional arguments. I wish that Go had them, too.

​ Read More
In-reply-to » @movq Regarding https://movq.de/blog/postings/2026-06-16/0/POSTING-en.html:

@lyse@lyse.isobeef.org In what way was KDE 3’s menu organized? KDE 1 is the only KDE version I ever used. 😅 We’re talking about this one, right?

Isn’t Notepad++ and Python cheating!? :-D

Well, Python was certainly already a thing back then, but Notepad++ is from 2003, right. I think I used https://www.wintotal.de/download/proton/ at the time? Maybe? I don’t know. 😅

​ Read More

@movq@www.uninformativ.de Regarding https://movq.de/blog/postings/2026-06-16/0/POSTING-en.html:

In my opinion, the KDE 3.5 menu was organized way better than the Windows Start menu. Granted, a typical KDE installation had much more applications to offer, too. So, there was more need to get it right. And it probably was also later in time.

Isn’t Notepad++ and Python cheating!? :-D

Crazy story on the clock’s seconds. I never heard of that before. Neat.

Yeah, UI these days is horrible. (That’s why my own TUIs suck, too!)

​ Read More
In-reply-to » @lyse By the way, which site generator are you using? I kind of miss having code blocks with syntax highlighting and that generic yellow highlighting thing is pretty cool, too.

@lyse@lyse.isobeef.org Ah, I almost thought so (that you wrote it by hand), but then I looked at the source code and saw the TOC and I was like: “Naah, probably not. I would be way too lazy to do that manually.” 😅 And indeed 
 ha.

Oh god, yeah, that’s a lot of <span>. đŸ€” Can’t really avoid that, I guess, especially if you want to do syntax highlighting of code blocks.

You wrote your own site generator, didn’t you?

In parts. I write everything in Markdown (it’s online, even: https://movq.de/blog/postings/2026-05-29/0/POSTING-en.md), plus a few Vim shortcuts (to generate thumbnails, for example), and then python-markdown renders it: https://pypi.org/project/Markdown/ This process is wrapped in a shell script, like “re-render every page if the .md file is newer than the .html file” and that’s mostly it. And the Atom feed generator is completely custom. đŸ€”

​ Read More

Please don’t spam people looking for employment. It’s just cruel
Earlier I posted in a “Who wants to be hired?” thread, looking for a place where I could apply my experience in hospitality, food tech and automation.

A couple hours later I received an email:

“Hi Ilia,

I saw your comment on the June Who’s Hiring thread. I build production-ready TypeScript and Python systems that integrate LLMs into real workflows, with particular focus on RAG, agent orchestration, and clear blah-blah-blah”

Come on.
I am a forced immigra 
 ⌘ Read more

​ Read More

PEP 829: Structured Startup Configuration via .site.toml Files
This PEP proposes a TOML-based configuration file format to replace the .pth file mechanism used by site.py during interpreter startup. The new format, using files named .site.toml, provides structured configuration for extending sys.path and executing package initialization code, replacing the current ad-hoc .pth format that conflates path configuration with arbitrary code execution. ⌘ Read more

​ Read More

PEP 827: Type Manipulation
We propose to add powerful type-level introspection and construction facilities to the type system, inspired in large part by TypeScript’s conditional and mapped types, but adapted to the quite different conditions of Python typing. ⌘ Read more

​ Read More

Fancy a 15% discount on my #Domestika #Python + #CreativeCoding course?

A_B_A_VILLARES-2026
Valid up to March 13th

https://www.domestika.org/en/courses/4307-designing-with-python-programming-for-a-visual-context/a_b_a_villares

(Beware Domestika also uses dark patterns like a very low priced offering that will trigger a “yearly subscription” after a month if you don’t read the small print and cancel
 not nice)

​ Read More

Cheers to all #Python #CreativeCoding people here using #Linux


Would you like to test a script by our friend and co-maintainer of thonny-py5mode GoToLoop that installs #ThonnyIDE and #py5 on your machine to see how it goes and help improve it?

https://Gist.GitHubUserContent.com/GoToLoop/246a31d437aaa8c6eadb7f7186544e0f/raw/thonny-installer.bash

I wonder if it would be bad form to ask students to run something like this:

curl -fsSL https://Gist.GitHubUserContent.com/GoToLoop/246a31d437aaa8c6eadb7f7186544e0f/raw/thonny-installer.bash -o thonny-installer.bash && chmod +x thonny-installer.bash && ./thonny-installer.bash

(because, you know, it trains them to run potentially dangerous stuff in other occasions)

​ Read More

Em vez de fazer o que eu devia estar fazendo
 eu melhorei o “grid layout” da minha pĂĄgina de sketches diĂĄrios. As imagens retangulares quando reduzidas na grade estavam “cropando” e agora sĂł escalam para a largura da coluna. Clicando nas imagens da grade Ă© possĂ­vel ver uma versĂŁo ampliada em “overlay”.

https://abav.lugaralgum.com/sketch-a-day/

#CreativeCoding #Processing #py5 #Python

​ Read More

# AteliĂȘ aberto de desenho com programação

Quintas-feiras 14:30 às 17:00 no #SescAvPaulista - 12 participantes, a partir de 16 anos. Distribuição gratuita de senhas 30 minutos antes.

Nesta atividade aberta, o pĂșblico pode interagir com cĂłdigo de maneira lĂșdica e criativa, gerando desenhos a partir da modificação de programas em Python.

A cada encontro vamos explorar diferentes temas da chamada “#programaçãoCriativa”, estudando obras, exemplos visuais, e ideias da computação que inspiraram inĂșmeros artistas e programadores ao longo das dĂ©cadas.

Fevereiro

5 de fevereiro - Módulos geométricos

12 de fevereiro - AnimaçÔes em loop

19 de fevereiro - Imagens reticuladas

26 de fevereiro - Texturas algorĂ­tmicas

Março

5 de março - Recortes e colagens digitais

12 de março - ExploraçÔes combinatórias

19 de março - Malhas tridimensionais

26 de março - Tipografia experimental

Abril

2 de abril - SimulaçÔes físicas

9 de abril - Plantas e fractais

16 de abril - AutĂŽmatos celulares

23 de abril - Desenhos interativos

​ Read More

# AteliĂȘ aberto de desenho com programação

Quintas-feiras 14:30 às 16:30 no #SescAvPaulista - 12 participantes, a partir de 16 anos. Distribuição gratuita de senhas 30 minutos antes.

Nesta atividade aberta, o pĂșblico pode interagir com cĂłdigo de maneira lĂșdica e criativa, gerando desenhos a partir da modificação de programas em Python.

A cada encontro vamos explorar diferentes temas da chamada “#programaçãoCriativa”, estudando obras, exemplos visuais, e ideias da computação que inspiraram inĂșmeros artistas e programadores ao longo das dĂ©cadas.

Fevereiro

5 de fevereiro - Módulos geométricos

12 de fevereiro - AnimaçÔes em loop

19 de fevereiro - Imagens reticuladas

26 de fevereiro - Texturas algorĂ­tmicas

Março

5 de março - Recortes e colagens digitais

12 de março - ExploraçÔes combinatórias

19 de março - Malhas tridimensionais

26 de março - Tipografia experimental

Abril

2 de abril - SimulaçÔes físicas

9 de abril - Plantas e fractais

16 de abril - AutĂŽmatos celulares

23 de abril - Desenhos interativos

​ Read More

Every single year I complain we should have an independent survey of Python users, not of “Python developers”, as many people who use Python do not identify as professional software developers (https://ciberlandia.pt/@villares/109885982178235703) and the questions in the survey make no sense for them. We should have someone doing serious research designing an unbiased survey, not a software firm like Jetbrains doing market research.
Every year I fail to do something effective about this.

[Reposted publicly with some tweaks]

​ Read More
In-reply-to » Omg, Python. Parsing arguments with argparse takes 50 ms on my NUC, because this pulls in all kinds of fancy stuff behind the scenes, colorization and what not. 😼‍💹

Just importing data classes takes another 60 ms 
 This fancy new stuff is really costly.

​ Read More

Omg, Python. Parsing arguments with argparse takes 50 ms on my NUC, because this pulls in all kinds of fancy stuff behind the scenes, colorization and what not. 😼‍💹

​ Read More

Spent basically the entire day (except for the mandatory walk) fighting with Python’s type hints. But, the result is that my widget toolkit now passes mypy --strict.

I really, really don’t want to write larger pieces of software without static typing anymore. With dynamic typing, you must test every code path in your program to catch even the most basic errors. pylint helps a bit (doesn’t need type hints), but that’s really not enough.

Also, somewhere along the way, I picked up a very bad (Python) programming style. (Actually, I know exactly where I picked that up, but I don’t want to point the finger now.) This style makes heavy use of dicts and tuples instead of proper classes. That works for small scripts, but it very quickly turns into an absolute mess once the program grows. Prime example: jenny. đŸ˜©

I have a love-hate relationship with Python’s type hints, because they are meaningless at runtime, so they can be utterly misleading. I’m beginning to like them as an additional safety-net, though.

(But really, if correctness is the goal, you either need to invest a ton of time to get 100% test coverage – or don’t use Python.)

​ Read More
In-reply-to » Since I used so much Rust during the holidays, I got totally used to rustfmt. I now use similar tools for Python (black and isort).

@movq@www.uninformativ.de @prologic@twtxt.net That’s what I like about Go, too. However, every now and then I really dislike the result, e.g. when removing spaces from a column layout. Doesn’t happen often, but when it does, I hate it.

I think I should have a look at Python formatters, too. Pep8 is deprecated, I think, it’s been some time that I looked at it.

​ Read More

PEP 821: Support for unpacking TypedDicts in Callable type hints
This PEP proposes allowing Unpack[TypedDict] in the parameter list inside Callable, enabling concise and type-safe ways to describe keyword-only callable signatures. Currently, Callable assumes positional-only parameters, and typing keyword-only functions requires verbose callback protocols. With this proposal, the keyword structure defined by a TypedDict can be reused directly in Callable. ⌘ Read more

​ Read More

Since I used so much Rust during the holidays, I got totally used to rustfmt. I now use similar tools for Python (black and isort).

What have I been doing all these years?! I never want to format code manually again. đŸ€ŁđŸ˜…

​ Read More

Hey folks! We have recently had a wonderful new release of #py5, read about the new 3D trimesh integration feature and the matplotlib TextPath integration.
That release was quickly followed by a release to fix some small issues that surfaced this last week. Please check out py5 0.10.9a1 and join us at https://github.com/py5coding/py5generator/discussions to share your experiences!

#CreativeCoding #Processing #Python #genuary (sorry for the hashtag spamming, I couldn’t resist!)

​ Read More
In-reply-to » More widget system progress:

And now the event loop is not a simple loop around curses’ getch() anymore but it can wait for events on any file descriptor. Here’s a simple test program that waits for connections on a TCP socket, accepts it, reads a line, sends back a line:

https://movq.de/v/93fa46a030/vid-1767547942.mp4

And the scrollbar indicators are working now.

I’ll probably implement timer callbacks using timerfd (even though that’s Linux-only). đŸ€”

​ Read More
In-reply-to » @movq That's cool! I also like the name of your library. :-) I assume you made the thing load quickly, didn't you?

@movq@www.uninformativ.de Yeah, I see. Just crudely checked on my computer, with around 0.013 seconds, Python 2.7 seems a tad faster than Python 3.14’s 0.023 seconds in this little program.

The lazy imports sound not too bad, but I just skimmed over them. There are surprisingly many exceptions, but yeah, no way around them. :-)

​ Read More
In-reply-to » @movq That's cool! I also like the name of your library. :-) I assume you made the thing load quickly, didn't you?

The baseline here is about 55 ms for nothing, btw. Python ain’t fast to start up.

$ time python -c 'exit(0)'

real    0m0.055s
user    0m0.046s
sys     0m0.007s

​ Read More
In-reply-to » @movq That's cool! I also like the name of your library. :-) I assume you made the thing load quickly, didn't you?

@lyse@lyse.isobeef.org

I assume you made the thing load quickly, didn’t you?

That’s the problem with Python. If you have a couple of files to import, it will take time.

I want this to be reasonably fast on my old Intel NUC from 2016 (Celeron N3050 @ 1.60GHz) and I already notice that the program startup takes about 95 ms (or 125 ms when there are no .pyc files yet). That’s still fine, but it shows that I’ll have to be careful and keep this thing very small 


Python 3.14 will bring lazy imports, maybe that can help in some cases.

​ Read More

Well, you girls and guys are making cool things, and I have some progress to show as well. 😅

https://movq.de/v/c0408a80b1/movwin.mp4

Scrolling widgets appears to work now. This is (mostly) Unicode-aware: Note how emojis like “😅” are double-width “characters” and the widget system knows this. It doesn’t try to place a “😅” in a location where there’s only one cell available.

Same goes for that weird â€œĂ€â€ thingie, which is actually “a” followed by U+0308 (a combining diacritic). Python itself thinks of this as two “characters”, but they only occupy one cell on the screen. (Assuming your terminal supports this 
)

This library does the heavy Unicode lifting: https://github.com/jquast/wcwidth (Take a look at its implementation to learn how horrible Unicode and human languages are.)

The program itself looks like this, it’s a proper widget hierarchy:

Image

(There is no input handling yet, hence some things are hardwired for the moment.)

​ Read More
In-reply-to » Trying to come up with a name for a new project and every name is already taken. đŸ€Ł The internet is full!

@lyse@lyse.isobeef.org I’m toying with the idea of making a widget/window system on top of Python’s ncurses. I’ve never really been happy with the existing ones (like urwid, textual, pytermgui, 
). I mean, they’re not horrible, it’s mostly the performance that’s bugging me – I don’t want to wait an entire second for a terminal program to start up.

Not sure if I’ll actually see it through, though. Unicode makes this kind of thing extremely hard. đŸ«€

​ Read More
​ Read More

@kiwu@twtxt.net Assembly is usually the most low-level programming language that you can get. Typical programming languages like Python or Go are a thick layer of abstraction over what the CPU actually does, but with Assembler you get to see it all and you get full control. (With lots of caveats and footnotes. 😅)

I’m interested in the boot process, i.e. what exactly happens when you turn on your computer. In that area, using Assembler is a must, because you really need that fine-grained control here.

​ Read More

PEP 819: JSON Package Metadata
This PEP proposes introducing JSON encoded core metadata and wheel file format metadata files in Python packages. Python package metadata (“core metadata”) was first defined in PEP 241 to use RFC 822 email headers to encode information about packages. This was reasonable in 2001; email messages were the only widely used, standardized text format that had a parser in the standard library. However, issues with handling different encodings, differing handling of line breaks, and other differences between i 
 ⌘ Read more

​ Read More

#Processing & #py5 tip:
Remember the shapes you put on draw() will be redrawn over and over, and if they don’t move (leaving a trail) you might want to either clean each frame with background(...), or stop the draw loop (noLoop() in Processing or no_loop() in py5), otherwise you kill the anti-aliasing of the lines :D

”`python
import py5

def setup():

py5.size(200, 200)
py5.stroke_weight(2)
# a line that will drawn once only
py5.line(10, 10, 190, 90)  

def draw():

# you could clean the frame here with background(200)
# this other line will be redrawn many times
py5.line(10, 110, 190, 190) 

def key_pressed():

py5.save('out.png')

py5.run_sketch()

”`

Image

​ Read More

#Processing & #py5 tip:
Remember the shapes you put on draw() will be redrawn over and over, and if they don’t move (leaving a trail) you might want to either clean each frame with background(...), or stop the draw loop (noLoop() in Processing or no_loop() in py5), otherwise you kill the anti-aliasing of the lines/strokes/edges!

I’m posting this tip because even using these tools for years and knowing this, today I briefly thought something was odd/broken because my lines were ugly with no “smoothing” :D

”`python
import py5

def setup():

py5.size(200, 200)
py5.stroke_weight(2)
# a line that will drawn once only
py5.line(10, 10, 190, 90)  

def draw():

# you could clean the frame here with background(200)
# this other line will be redrawn many times
py5.line(10, 110, 190, 190) 

def key_pressed():

py5.save('out.png')

py5.run_sketch()

”`

Image

​ Read More
In-reply-to » Come back from my trip, run my AoC 2025 Day 1 solution in my own language (mu) and find it didn't run correctly đŸ€Ł Ooops!

Ahh that’s because I forgot to call main() at the end of the source file. mu is a bit of a dynamic programming language, mix of Go(ish) and Python(ish).

$ ./bin/mu examples/aoc2025/day1.mu 
Execution failed: undefined variable readline

​ Read More

Using #Python’s #pathlib to compare two repos and get back some missing files from a “recovered” version of a repo (mostly stuff in .gitignore that is handy not to discard right now).

from pathlib import Path

a = Path('sketch-a-day')
b = Path('sketch-a-day_broken')

files_a =  {p.relative_to(a) for p in a.rglob('*')
    if '.git' not in str(p)
    if 'cache' not in str(p)
    if 'checkpoint' not in str(p)
}
files_b =  {p.relative_to(b) for p in b.rglob('*')
    if '.git' not in str(p)
    if 'cache' not in str(p)
    if 'checkpoint' not in str(p)
}
missing = files_b - files_a

for p in missing:
    (b / p).rename((a / p))

​ Read More
In-reply-to » Advent of Code 2025 starts tomorrow. đŸ„łđŸŽ„

Alright, Advent of Code is over:

https://www.uninformativ.de/blog/postings/2025-12-12/0/POSTING-en.html

It’s been quite the time sink, especially with the DOS games on top, but it was fun. đŸ„ł

In case you’re wondering: All puzzles (except for part 2 of day 10) were doable in Python 1 on SuSE Linux 6.4 and ran in a finite time on the Pentium 133. Puzzle 10/2 might have been doable as well if I had better education. đŸ€Ł

​ Read More

It was though year. I finished my PhD, yay! Now, I’m on vacation from my main job, as educator at Sesc, and yesterday I wound down some last freelance work obligations. I really need a break.

I want to rest, make some “prints” of my drawings for friends, go to my local museums and have coffee/tea with friends, and that’s it!

Today we celebrate 18 years of our local #Python users group, #GruPySP, and I’m going to meet friends from #GaroaHackerClube, that’s a great start :)

​ Read More
In-reply-to » Advent of Code 2025 starts tomorrow. đŸ„łđŸŽ„

FWIW, day 03 and day 04 where solved on SuSE Linux 6.4:

Image

Image

Performance really is an issue. Anything is fast on a modern machine with modern Python. But that old stuff, oof, it takes a while 
 😅

Should have used C or Java. đŸ€Ș Well, maybe I do have to fall back on that for later puzzles. We’ll see.

​ Read More

PEP 815: Deprecate RECORD.jws and RECORD.p7s
This PEP deprecates the RECORD.jws and RECORD.p7s wheel signature files. Lack of support in tooling means that these virtually unused files do not provide the security they purport. Users looking for wheel signing should instead refer to index hosted attestations. ⌘ Read more

​ Read More
In-reply-to » Advent of Code 2025 starts tomorrow. đŸ„łđŸŽ„

Day 2 was pretty tough on my old hardware. Part 1 originally took 16 minutes, then I got it down to 9 seconds – only to realize later that my solution abused some properties of my particular input. A correct solution will probably take about 30 seconds. đŸ«€

Part 2 took 29 minutes this morning. I wrote an optimized version but haven’t tested it yet. I hope it’ll be under a minute.

Python 1 feels really slow, even compared to Java 1. And these first puzzles weren’t even computationally intensive. We’ll see how far I’ll make it 


Image

​ Read More

Thinking about doing Advent of Code in my own tiny language mu this year.

mu is:

  • Dynamically typed
  • Lexically scoped with closures
  • Has a Go-like curly-brace syntax
  • Built around lists, maps, and first-class functions

Key syntax:

  • Functions use fn and braces:
fn add(a, b) {
    return a + b
}
  • Variables use := for declaration and = for assignment:
x := 10
x = x + 1
  • Control flow includes if / else and while:
if x > 5 {
    println("big")
} else {
    println("small")
}
while x < 10 {
    x = x + 1
}
  • Lists and maps:
nums := [1, 2, 3]
nums[1] = 42
ages := {"alice": 30, "bob": 25}
ages["bob"] = ages["bob"] + 1

Supported types:

  • int
  • bool
  • string
  • list
  • map
  • fn
  • nil

mu feels like a tiny little Go-ish, Python-ish language — curious to see how far I can get with it for Advent of Code this year. 🎄

​ Read More

Advent of Code 2025 starts tomorrow. đŸ„łđŸŽ„

This year, I’m going to use Python 1 on SuSE Linux 6.4, writing the code on my trusty old Pentium 133 with its 64 MB of RAM. No idea if that old version of Python will be fast enough for later puzzles. We’ll see.

Image

​ Read More

All my newly added test cases failed, that movq thankfully provided in https://git.mills.io/yarnsocial/twtxt.dev/pulls/28#issuecomment-20801 for the draft of the twt hash v2 extension. The first error was easy to see in the diff. The hashes were way too long. You’ve already guessed it, I had cut the hash from the twelfth character towards the end instead of taking the first twelve characters: hash[12:] instead of hash[:12].

After fixing this rookie mistake, the tests still all failed. Hmmm. Did I still cut the wrong twelve characters? :-? I even checked the Go reference implementation in the document itself. But it read basically the same as mine. Strange, what the heck is going on here?

Turns out that my vim replacements to transform the Python code into Go code butchered all the URLs. ;-) The order of operations matters. I first replaced the equals with colons for the subtest struct fields and then wanted to transform the RFC 3339 timestamp strings to time.Date(
) calls. So, I replaced the colons in the time with commas and spaces. Hence, my URLs then also all read https, //example.com/twtxt.txt.

But that was it. All test green. \o/

​ Read More
In-reply-to » FTR, I see one (two) issues with PyQt6, sadly:

@movq@www.uninformativ.de I think I now remember having similar problems back then. I’m pretty sure I typically consulted the Qt C++ documentation and only very rarely looked at the Python one. It was easy enough to translate the C++ code to Python.

Yeah, the GIL can be problematic at times. I’m glad it wasn’t an issue for my application.

​ Read More
In-reply-to » There are no really good GUI toolkits for Linux, are there?

FTR, I see one (two) issues with PyQt6, sadly:

  1. The PyQt6 docs appear to be mostly auto-generated from the C++ docs. And they contain many errors or broken examples (due to the auto-conversion). I found this relatively unpleasent to work with.
  2. (Until Python finally gets rid of the Global Interpreter Lock properly, it’s not really suited for GUI programs anyway – in my opinion. You can’t offload anything to a second thread, because the whole program is still single-threaded. This would have made my fractal rendering program impossible, for example.)

​ Read More

I’m still looking for people, podcasts, events talking about #Python without assuming everyone is a software developer or a “data scientist”.

Why are data journalists, type designers (Guido’s brother!), Blender wizards, FreeCAD hackers, hobbyist game makers, casual automation buffs, robot tweakers, MicroPython enthusiasts, creative coders, educators, biologists, astronomers and other scientists, consistently ignored?

Are we f*ing invisible? One of Python Brasil keynoters kind of just did that. My heart sank. Other talks, like the Art&FLOSS one, by Jim Schmitz, lessened my pain.

Where is the follow up for that 2017 keynote by Jake VanderPlas?

​ Read More

I’m still looking for people, podcasts, events, talking about #Python without assuming everyone is a software developer or a “data scientist”.

Why are data journalists, type designers (Guido’s brother!), Blender wizards, FreeCAD hackers, hobbyist game makers, casual automation buffs, robot tweakers, MicroPython enthusiasts, creative coders, educators, biologists, astronomers and other scientists, consistently ignored?

Are we invisible? One of Python Brasil keynoters kind of just did that. My heart sank. Other talks, like the Art&FLOSS one, by Jim Schmitz, lessened my pain.

Where is the follow up for that 2017 keynote by Jake VanderPlas?

​ Read More