A good example of a complex use of textures with #3D in #py5!
https://github.com/vsquared/TruncatedCube-py5
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âŠ
- âPython Ă© para artistas tambĂ©mâ https://umapenca.com/villares/bottons/python-is-for-artists-too-299976.html
- Algum desenho meu?
- As âfab fourâ bibliotecas que eu curto? https://umapenca.com/villares/camiseta/numpy-shapely-trimesh-e-py5-285676.html (numpy, shapely, trimesh & py5)
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.
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
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
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.
I have just watched @lrâs keynote at #PyConColombia!
https://www.youtube.com/live/Y70q2Yfwh1E?si=W_w31WuqlqRPkyVt&t=31271
#hackerspaces #PyLadies #AntonioCandido #SamAltmanIsACrook
#Python #sets #communities
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âŠ
I kind of feel that I finally found a way to visualize and maybe explain to myself and others how a #numpy #meshgrid works⊠Letâs see how long this feeling lasts đ
(⊠I should draw some diagrams from this insightâŠ) #python #education
Em agosto no #SescAvPaulista em #SãoPaulo vão recomeçar as minhas atividades abertas (gråtis) com #Python, #py5 e #ProgramaçãoCriativa.
Os temas de agosto sĂŁo relacionados a simulaçÔes fĂsicas, e em setembro vĂŁo ser ser relacionados a biologia :)
https://www.sescsp.org.br/programacao/atelie-aberto-simulacoes-fisicas-com-programacao/
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
@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-)
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.
@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.
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.
âŠand also Packaide v2
I want to check this at some pointâŠ
«spyrrow⚠Python wrapper of Sparrow, State-of-the-art Nesting for 2D irregular strip packing»
@lyse@lyse.isobeef.org Besides, have a look at
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.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.
@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. đ
@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!)
The Smallest Brain You Can Build: A Perceptron in Python
Article URL: https://ranpara.net/posts/perceptron-explained-from-scratch/
Comments URL: https://news.ycombinator.com/item?id=48440064
Points: 4
# Comments: 0 â Read more
@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. đ€
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
Python utility package for building Claude Code hooks
Article URL: https://github.com/RasmusGodske/claude-hook-utils
Comments URL: https://news.ycombinator.com/item?id=48318978
Points: 5
# Comments: 0 â Read more
Python 3.15: features that didnât make the headlines
Article URL: https://blog.changs.co.uk/python-315-features-that-didnt-make-the-headlines.html
Comments URL: https://news.ycombinator.com/item?id=48220696
Points: 4
# Comments: 0 â Read more
He Couldnât Land a Job Interview. Was AI to Blame?
Armed with some Python and a white-hot sense of injustice, one medical student spent six months trying to figure out whether an algorithm trashed his job application. â Read more
PEP 833: Freezing the HTML simple repository API
This PEP proposes freezing the standard HTML representation of the simple repository API, as originally specified in PEP 503 and updated over subsequent PEPs. â 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
PEP 828: Supporting âyield fromâ in asynchronous generators
This PEP introduces support for yield from in an asynchronous generator function. â 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
PEP 826: Python 3.16 Release Schedule
This document describes the development and release schedule for Python 3.16. â Read more
A #PythonBrasil2026 estĂĄ com chamada aberta para propstas de atividades (tutoriais, palestras e sprints)!
https://talks.python.org.br/pybr26/cfp
EN: Python Brazil 2026: Call for Proposals
Fancy a 15% discount on my #Domestika #Python + #CreativeCoding course?
A_B_A_VILLARES-2026
Valid up to March 13th
(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)
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?
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)
Baixamos uns dados do GeoSampa e experimentamos um pouco com #OSMnx e #GeoPandas + #Folium
Hoje Ă© dia de #Python Lab! Vamos conversar sobre dados georreferenciados e #OSMnx 19h no @garoa@garoa #hackerspace #SĂŁoPaulo
When I switch from Python to JavaScript and forget semicolons â 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â.
â O bloco with e os gerenciadores de contexto [no #Python]â #LiveDePython 302
âO bloco with e os gerenciadores de contexto [no #Python]â #LiveDePython 302
# 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
# 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
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]
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.
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. đźâđš
Camiseta infantil com entrega para todo o Brasil? EstĂĄ tendo!
https://umapenca.com/villares/camiseta-infantil/aviao-290863.html
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.)
Woman wakes up to discover giant python curled up on top of her
A woman from Brisbane recently woke up in the dead of night to discover that she had a rather unexpected visitor. Anyone who is concerned about travel⊠â Read more
Pep8 is deprecated, I think
Hmm, I donât think it is, this still says âStatus: Activeâ: https://peps.python.org/pep-0008/ đ€
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.
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
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. đ€Łđ
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!)
Post sobre o curso grĂĄtis na Udemy, complementar ao livro âAutomate the Boring Stuff with #Pythonâ (que tambĂ©m pode ser lido de graça no site do autor)
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). đ€
@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. :-)
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
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.
@prologic@twtxt.net No, thatâs Python/curses on Linux. đ
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:
(There is no input handling yet, hence some things are hardwired for the moment.)
@movq@www.uninformativ.de Yeah. I had that in my Python implementation and was really missing that.
@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. đ«€
@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.
Note to self: check if pygments can generate SVG, test and/or find another way to incorporate nicely formatted code into a py5 sketch⊠#python
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
Anteontem concretizei finalmente uma ideia de hĂĄ anos â uma pequena biblioteca #python para emitir sons com cada tecla que pressionamos. Espero logo ter energia pra gravar um pequeno vĂdeo de demo e publicar o repositĂłrio
#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()
â`
#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()
â`
I finished all 12 days of Advent of Code 2025! #AdventOfCode https://adventofcode.com â did it in my own language, mu (Go/Python-ish, dynamic, int/bool/string, no floats/bitwise). Found a VM bug, fixed it, and the self-hosted mu compiler/VM (written in mu, host in Go) carried me through. đ„ł
I just completed âPrinting Departmentâ - Day 4 - Advent of Code 2025 #AdventOfCode https://adventofcode.com/2025/day/4 â Again, Iâm doing this in mu, a Go(ish) / Python(ish) dynamic langugage that I had to design and build first which has very few builtins and only a handful of types (ints, no flots). đ€Ł
I just completed âLobbyâ - Day 3 - Advent of Code 2025 #AdventOfCode https://adventofcode.com/2025/day/3 â Again, Iâm doing this in mu, a Go(ish) / Python(ish) dynamic langugage that I had to design and build first which has very few builtins and only a handful of types (ints, no flots). đ€Ł
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
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))
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. đ€Ł
Ano que vem no MAM-SP vou dar dois cursos online, o que eu dei ano passado vai ser em abril, mas agora em janeiro eu vou dar um outro curso mais curtinho com 3 encontros:
https://mam.org.br/curso/arte-computacional-produzindo-imagens-reticuladas/
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 :)
FWIW, day 03 and day 04 where solved on SuSE Linux 6.4:
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.
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
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 âŠ
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
fnand braces:
fn add(a, b) {
return a + b
}
- Variables use
:=for declaration and=for assignment:
x := 10
x = x + 1
- Control flow includes
if/elseandwhile:
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. đ
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.
Today during class we built a small example showing #random vs. #PerlinNoise
#Processing #Python py5
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/
âNo Fascists Allowed!â Says Trans Lesbian Python Dev
Gatekeeping. â Read more
Python Launches DEI Marketing Campaign
First Python refused to stop discriminatory policies & turned down $1.5 Million from the US Government. â Read more
Windows at work, always a fresh inconvenience:
C:\>python -m pip install ipython
Requirement already satisfied: ipython in c:\users\[...]
C:\>ipython
'ipython' is not recognized [...]
@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.
FTR, I see one (two) issues with PyQt6, sadly:
- 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.
- (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.)
Today in my #Python themed study group at the community center a young participant recommended:
https://store.steampowered.com/app/2060160/The_Farmer_Was_Replaced/
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?
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?
PEP 814: Add frozendict built-in type
A new public immutable type frozendict is added to the builtins module. â Read more
So, when is geopolars coming?
maybe I want geonarwhals?
:blob_clown: #pandas #polars #narwhals #python #geopandas #geodata
Python Software Foundation Running Out of Money
After turning down $1.5 Million from the US Government as an act of DEI Virtue Signalling, the Python Software Foundation reveals that they have a $1.4 Million deficit, with only 6 months of money left. â Read more
https://villares-shop.fourthwall.com/
#Python is for artists too!
#CreativeCoding #py5 #Processing #LSystem