@danzin@mastodon.social
@danzin@mastodon.social avatar

danzin

@danzin@mastodon.social

Brazilian hobbyist Pythonista. Pythonista amador.
#python
He/him/ele

This profile is from a federated server and may be incomplete. Browse more on the original instance.

sigmavirus24, to random
@sigmavirus24@hachyderm.io avatar

I'm not normally a fan of Debian but they just axed Stefan's mpdecimal so I'd say today is a good day for Debian. No one needs that asshat around or involved unnecessarily

danzin,
@danzin@mastodon.social avatar

@sigmavirus24

I think what @glyph means is Python vendors libmpdec, will that also be axed or just the standalone version?

"Python’s _decimal module (adapted from cdecimal in version 3.3) is a wrapper around libmpdec."

https://www.bytereef.org/mpdecimal/index.html

"_decimal.c is a wrapper for the libmpdec library."

https://github.com/python/cpython/tree/3.12/Modules/_decimal

danzin,
@danzin@mastodon.social avatar

@sigmavirus24 @glyph Ah, the reason for the removal is " No longer required for cpython", so I guess that means _decimal stays.

https://tracker.debian.org/news/1518602/removed-251-2-from-unstable/

https://tracker.debian.org/pkg/mpdecimal

nedbat, to random
@nedbat@hachyderm.io avatar

My test suite has just one dot on the last line. What would you do?

  • Delete one test
  • Change the width of the terminal
  • Keep it as a visceral reminder of the uncomfortably chaotic nature of the universe
  • Write more tests
danzin,
@danzin@mastodon.social avatar

@nedbat That's a lot of new tests needed for a good dots feng shui. Maybe write a single new one with a loop and use the subtests fixture? Then you can detect the terminal width and scale the loop to always fill it correctly.

danzin, to random Portuguese
@danzin@mastodon.social avatar

Caramba, já fiz mais de 500 toots e tenho mais de 500 seguidores 😮, como pode?!

Agradeço a vocês por esse lugar interessante aonde venho me divertir, aprender e desabafar.

Algumas contas especiais:

@villares
@gutocarvalho
@santiago
@liaamancio
@tatianasaito
@augustocc @arles
@melissawm
@ericof
@anna
@steh
@gattaraS2
@dunossauro
@daltux
@xPandeMoniax
@andrelopes
@punkbiology
@rennerocha
@amosbatista
@tofu_boy
@duran
@bug_elseif
@capitaobviodev
@rmx
@bhayashi
@mar
@riverfount
@morgannadev

danzin, to python
@danzin@mastodon.social avatar

There's this very useful and widely used tool, @coveragepy, that creates HTML coverage reports and uses in them.

I have proposed a simple PR to fix a small issue in sorting columns in the reports: https://github.com/nedbat/coveragepy/pull/1768/files

However, I'm very bad at .

The behavior is working as intended, but I can't shake the feeling that my JS code is awful in some way I can't see.

Could you take a quick look at the diff and point out anything that should be improved? TIA!

danzin,
@danzin@mastodon.social avatar

@hugovk @coveragepy Thank you very much!

Changed var to let and that led me to finding a place I was var declaring a variable twice.

danzin, to python
@danzin@mastodon.social avatar

PyPy v7.3.16 has been released:
https://www.pypy.org/posts/2024/04/pypy-v7316-release.html

"This release includes security fixes from upstream CPython, and bugfixes to the garbage collector, described in a gc bug-hunt blog post."

The mentioned blog post is https://www.pypy.org/posts/2024/03/fixing-bug-incremental-gc.html by @cfbolz

Changelog at https://doc.pypy.org/en/latest/release-v7.3.16.html#changelog

Some changes I like:

  • Faster, correct str.expandtabs()
  • Fix subprocess executable path on Windows (unlisted)
  • Faster normalize_exception
  • Correct cache size detection on aarch64

danzin, to python
@danzin@mastodon.social avatar

help needed.

I have an open PR to , adding support for dict views (those you get from e.g. dict.items(), plus ABC mapping views) to pprint.

Problem is, this is an old PR that has seen a lot of churn as I better grokked the original code and ways to simplify my own. It has taken a fair bit of review time by core devs. So I'd like to have more eyes checking it before I ask for another core dev review.

Could you take a look and offer any suggestions?

https://github.com/python/cpython/pull/30135/files

nedbat, to random
@nedbat@hachyderm.io avatar

Anyone with some Javascript/HTML knowledge want to help me fix what should be a simple problem with the coverage.py HTML report? https://github.com/nedbat/coveragepy/issues/1765

danzin,
@danzin@mastodon.social avatar

@nedbat I get error messages about the lines starting at:

174 <a id="prevFileLink" class="nav" href="d_7b071bdc2a35fa80_whiteutils_py.html"/>

It says you cannot use a self-closing tag here, so it considers this an opening tag and the next tag a closing one. Maybe try </a> and </button> in these lines instead?

danzin,
@danzin@mastodon.social avatar

@nedbat Ah, I think I get it. The fact that the <a> tag for the nextFileLink isn't properly closed makes the <button>s children of this link.

Somehow, that makes the shortcuts activate that link. You can see that by pressing "?", which also takes you to the next file.

danzin, to python Portuguese
@danzin@mastodon.social avatar

Quem aí vai (ou gostaria de) participar da Python Cerrado 2024?

Vai acontecer em Brasília, de 25 de novembro a 1º de dezembro de 2024, em conjunto com e simultaneamente à Plone Conference 2024.

A keynote será da grande @melissawm

Se tudo der certo, vai ser meu primeiro evento de Python. Gostaria de ajudar de alguma forma.

https://2024.ploneconf.org/pt-br/noticias/python-cerrado-acontecera-de-25-de-novembro-a-1o-de-dezembro-de-2024

@ploneorgbr
@ploneconf

danzin, to python
@danzin@mastodon.social avatar

Just got my copy of "Software Design by Example" by @gvwilson!

The website in the notebook screen is the web version of the book, available for free at https://third-bit.com/sdxpy/

danzin, to random Portuguese
@danzin@mastodon.social avatar

Fizemos uma entrega monstruosa no trabalho hoje. Meses de ralação, pesquisa, campo, entrevistas, o escambau. Tudo cristalizado num estudo que pode fazer alguma diferença pra melhor.

Imaginava que ia fechar o assunto, não contava com os pedidos de complementação (justos). Vamos de acréscimos e prorrogação então.

Mesmo assim, muito a comemorar. Muito medo e ansiedade no início do projeto, saio mais confiante. Boas parcerias, apoio dos colegas, contribuições dos chefes.

E não consigo dormir :D

nedbat, to random
@nedbat@hachyderm.io avatar

Anyone on Windows have (or can install) PyPy 3.10 (7.3.15, the latest) and can try to reproduce this coverage.py test suite problem?
https://github.com/nedbat/coveragepy/issues/1737
TIA!

danzin,
@danzin@mastodon.social avatar

@nedbat Got it: print(sys.executable) from multiprocessing prints the system PyPy in 7.3.15, but the venv onein 7.3.14.

A reproducer, no coverage used:

import multiprocessing as mp  
import sys

def worker(a):  
 print(sys.executable, "worker python")

if __name__ == "__main__":  
 print(sys.executable, "main python")  
 mp.set_start_method("spawn")  
 p = mp.Pool(3)  
 outputs = p.imap_unordered(worker, [(x,) for x in range(6)])  
 p.close()  
 p.join()  

https://github.com/pypy/pypy/issues/4876#issuecomment-1908004945

danzin, to python
@danzin@mastodon.social avatar

PyPy v7.3.15 release

https://www.pypy.org/posts/2024/01/pypy-v7315-release.html

"The PyPy team is proud to release version 7.3.15 of PyPy.

This is primarily a bug-fix release, and includes work done to migrate PyPy to Git and Github."

PyPy deserves a lot more recognition and contributions.

At the time of this post, PyPy has 530 stars on GitHub. Please star it if you haven't yet.

Activity seems to have slightly increased: https://github.com/pypy/pypy/graphs/contributors?from=2023-01-06&to=2024-01-16&type=c

The wiki has been ported to https://github.com/pypy/pypy/wiki/

duran, to random Portuguese
@duran@bolha.one avatar

deleted_by_author

  • Loading...
  • danzin,
    @danzin@mastodon.social avatar

    @duran Parabéns! Aproveite bem!

    danzin, to python
    @danzin@mastodon.social avatar

    Wow, PyPy has passed 400 stars on GitHub already: https://github.com/pypy/pypy

    If you haven't starred it yet, now is the time :)

    Also, their Sponsors page could do with some more people: https://github.com/sponsors/pypy.

    For detailed data on past contributions (and another place to help fund PyPy if GitHub sponsoring isn't your thing), visit https://opencollective.com/pypy.

    danzin, to python
    @danzin@mastodon.social avatar

    Fast DOOM WAD renderer in 999 lines of Python

    "For the longest time, I've wanted to re-implement the original DOOM engine in Python, and compile it with Shedskin to get reasonable performance. So when I finally ran across a pretty small engine written in Java, by Leonardo Ono, I decided to convert his version to Python. "

    https://shed-skin.blogspot.com/2024/01/fast-doom-wad-renderer-in-999-lines-of.html?m=1

    duran, to random Portuguese
    @duran@bolha.one avatar

    deleted_by_author

  • Loading...
  • danzin,
    @danzin@mastodon.social avatar

    @duran É sinal de organização, se depois precisar indicar o adestrador pq as pessoas estão encantadas com o Aderbal, tá tudo registrado.

    danzin, to python
    @danzin@mastodon.social avatar

    PyPy has moved to Git, GitHub:
    https://www.pypy.org/posts/2023/12/pypy-moved-to-git-github.html

    "PyPy has moved its canonical repo and issue tracker from https://foss.heptapod.net/pypy/pypy to https://github.com/pypy/pypy."

    Even though the team prefers Mercurial, they believe being on GitHub will foster contributions.

    If you know your way around GitHub Actions, Buildbots, GH Wikis, or are interested in contributing, now is a great time to get involved. Starring the repo helps with visibility.

    Congrats @mattip @cfbolz and team!

    danzin, to python
    @danzin@mastodon.social avatar

    Shed Skin 0.9.6 released

    "I recently decided to sit down and finally port Shed Skin, an experimental restricted-Python-to-C++ compiler in the works since 2005 or so, to Python3. [...]

    This does not mean that every Python3 feature is supported [...]. For example, unicode is still restricted to 1-byte characters, and there is no support (yet) for nice new features such as f-strings. [...] subsequent releases should add support for various new features."


    https://shed-skin.blogspot.com/2023/12/shed-skin-restricted-python-to-c.html

    danzin, to python
    @danzin@mastodon.social avatar

    v7.3.14: release of 2.7, 3.9, and 3.10

    "The PyPy team is proud to release version 7.3.14 of PyPy.

    Hightlights of this release are compatibility with HPy-0.9, cffi 1.16, additional C-API interfaces, and more python3.10 fixes.
    [...]
    We would like to thank our donors for the continued support of the PyPy project.
    [...]
    We would also like to thank our contributors and encourage new people to join the project. "

    Pypy is a great project, contribute to it!

    https://www.pypy.org/posts/2023/12/pypy-v7314-release.html

    appassionato, to books
    @appassionato@mastodon.social avatar

    The Mechanism

    A gripping narrative of power, corruption and greed, The Mechanism is the true story of how a simple investigation into money laundering uncovered the biggest corruption scandal in human history.

    The Mechanism is an essential work of non-fiction that exposes the rottenness caused when politicians and big businesses believe they are above the law.

    @bookstodon





    danzin,
    @danzin@mastodon.social avatar

    @appassionato @bookstodon A follow up book will be even more interesting: it turns out this case's star judge and prosecutors were also politically motivated and in cahoots, with many of their procedures currently under heavy criticism.

    A crazy example is that they put in prison an ex-president who was sure to win the election, then the judge (Moro) went to work for the elected president (Bolsonaro!) as Justice Minister, expecting a seat on the Brazilian Supreme Court as reward.

    danzin,
    @danzin@mastodon.social avatar

    @appassionato @bookstodon That ex-president (Lula) is now president again, after the Brazilian Supreme Court (STF) decided Moro was not an impartial judge in the case.

    Moro became a Senator, a star prosecutor was also elected. Both are politically opposition to the party they most heavily went after during the investigations, the Worker's Party (PT).

    And The Intercept has published a series of reports on improper contacts between judge and prosecutors during the investigation.

    danzin,
    @danzin@mastodon.social avatar

    @blogdiva @appassionato @bookstodon It was worse than it looks: they had reason to investigate the vice-president (Temer) who plotted against president Dilma but chose not to. So he became president after the soft coup.

    Later, when he was an ex-president, they asked for him to be arrested based on the same materials they didn't want to pursue when he was set to replace her.

    The so called heroes were actually focused on the political results, not fighting corruption.

    https://brasil.elpais.com/brasil/2019/09/30/economia/1569857428_539313.html

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • everett
  • magazineikmin
  • hgfsjryuu7
  • vwfavf
  • mdbf
  • ethstaker
  • Youngstown
  • slotface
  • ngwrru68w68
  • rosin
  • PowerRangers
  • kavyap
  • DreamBathrooms
  • normalnudes
  • khanakhh
  • thenastyranch
  • osvaldo12
  • tacticalgear
  • Durango
  • cubers
  • InstantRegret
  • GTA5RPClips
  • tester
  • cisconetworking
  • modclub
  • Leos
  • provamag3
  • All magazines