mkennedy, to python
@mkennedy@fosstodon.org avatar

Registration for PyCon US 2024 is now open. I registered and will be there from Thursday to Sunday.

My trip this year will be shorter than normal because the ridiculous mask policy put in place by @ThePSF.

Still looking forward to seeing you all there. :)

maxim, (edited ) to mastodon
@maxim@mastodon.gamedev.place avatar

Hello programmers from

I have a question for you.

⭐ What programming language do you use most of your life? Why exactly?

Most of my time I worked with almost the entire .Net stack, and in recent years it's Unity, so my language is C#
There were episodes in my life with mobile, many web stuff, java, c++, databases, etc.

folkerschamel, to python
@folkerschamel@mastodon.social avatar

for fans:
where does this error come from?


In my opinion, one of the great things about is that it's simple and straightforward - you don't get unexpected surprises. But there are a few exceptions, as this example shows.😉

anedroid, to python Polish
@anedroid@wspanialy.eu avatar

Bardzo bym prosił o audyt mojego projektu "midutils". Są to 3 małe programy w Pythonie, których zadaniem jest ochrona plików przed nieuprzywilejowanymi procesami, np. plików cookies w Firefoxie, kluczy SSH, ważnych dokumentów. W szczególności zależy mi na ostatnim narzędziu "midlaunch" uruchamiającym aplikacje w kontenerach bwrap, które jest najbardziej złożone (407 linijek kodu). Wszystkie programy wymagają uprawnień root, więc niedopatrzenia mogą prowadzić do nieautoryzowanej eskalacji uprawnień.

Uważam, że w ekosystemie GNU/Linuxa brakuje tego typu narzędzi, więc zrobiłem własne. Chciałbym aby kiedyś trafiło do repozytoriów Arch, Ubuntu, Fedory i innych dystrybucji i pomogło poprawić bezpieczeństwo użytkowników desktopowego GNU/Linuxa. Niestety nie mam zbyt dużego doświadczenia w pracy nad średnimi i dużymi projektami, dlatego proszę was o pomoc.

Link do repozytorium git: https://git.disroot.org/anedroid/midutils

array, to python
@array@fosstodon.org avatar

I like . It was the first programming language I tried, it had a reputation of being easy to learn and yeah, it was. What I don't really understand is how it has become so popular (# 1 in the TIOBE index...) and pervasive (you find it in areas where it seems like logic for a scripting language, but in others where you wouldn't bet for it too). It shines where it shines, but aren't really there better options in some of the niches it is being used for?

ascherbaum, to python
@ascherbaum@mastodon.social avatar

My blog is running with , and I have a script which runs as pre-commit and checks all files.

Things like:

  • certain keywords are cursive
  • certain tags exist, based on content
  • invalid links
  • http links
  • code blocks are marked
  • preview image exists
  • preview text exists
  • ... some more

Is this something other people are interested in? Then I make the script configurable, and more formal.

ado, to python

I am really excited for 3.12 for three reasons.

First reason - No more ugly TypeVar declarations.

Old generic type:

from typing import Generic, TypeVar<br></br><br></br>_T_co = TypeVar("_T_co", covariant=True, bound=str)<br></br><br></br>class ClassA(Generic[_T_co]):<br></br>    def method1(self) -> _T_co:<br></br>        ...<br></br>

New generic:

class ClassA[T: str]:<br></br>    def method1(self) -> T:<br></br>        ...<br></br>

Second reason: 🚀 Gotta go fast. From the abstract

Comprehensions are currently compiled as nested functions, which provides isolation of the comprehension’s iteration variable, but is inefficient at runtime. This PEP proposes to inline list, dictionary, and set comprehensions into the code where they are defined, and provide the expected isolation by pushing/popping clashing locals on the stack.

Last: F Strings will support some common use cases that broke interpolation in the past, like f'{ myDict['myKey'] }' and f"{'n'.join(a)}"

Full notes: https://www.python.org/downloads/release/python-3120b3/

jonny, (edited ) to random
@jonny@neuromatch.social avatar

I am starting a new project that is intended to be designed as a () protocol eventually with implementations in multiple languages. I know well, but I have been learning and think I'll need to write at least some of the perf-sensitive components in Rust. Do I prototype it in Python and then rewrite in Rust later, or try and power through and write it in Rust now?

edit: added hashtags fwiw

mkennedy, to python
@mkennedy@fosstodon.org avatar

Looks like I won’t be speaking at this year folks. That's 0/8 talks (accepted / submitted) over the years. You'd think just by the numbers one of them would have made it in. Oh well. Here are my 3 talks that were not accepted.

  • 20+ Cutting Edge Python Frameworks, Packages, and Tools You Should Know About
  • Python's Types: 5 Amazing Ways Python Type Hints Will Supercharge Your Code
  • HTMX + Flask: Modern Python Web Apps, Hold the JavaScript
vwbusguy, to python
@vwbusguy@mastodon.online avatar

C devs when they code in .

paulox, (edited ) to django
@paulox@fosstodon.org avatar

I published an introduction to database generated columns, using SQLite and the new GeneratedField added in Django 5.0 🤖

I'd be very happy to have your feedback on my article 🤗

https://www.paulox.net/2023/11/07/database-generated-columns-part-1-django-and-sqlite/

nobodyinperson, to python
@nobodyinperson@fosstodon.org avatar

I have been struggling hard doing proper :python: #Python development on :nixos: #NixOS.

pip install'ed binary packages (numpy et. al) don't work (i.e. don't find system libraries like libz libstdc++ etc.), making scientific data analysis completely impossible. The workarounds (using the nixpkgs versions or setting LD_LIBRARY_PATH) are not viable.

With this #poetry2nix flake template (the clue is preferWheels=true) it seems I can finally work properly:

https://gitlab.com/nobodyinperson/flakes/-/tree/main/poetry2nix

#nix

nicolemark, to python
@nicolemark@vis.social avatar

Any devs in the house? I’m getting unpickling error A, which I’ve never seen before. I searched StackOverflow already, obv. It’s esp hard to troubleshoot because it’s in a Jupyter notebook environment controlled by my professor, so I can only change certain parts of the code. TA wasn’t much help—told me to install pickle. 🤦🏼‍♀️

glyph, to python
@glyph@mastodon.social avatar

New version of Fritter today, <https://pypi.org/project/fritter/0.0.7/>, my library for interacting with the passage of time in a generalized way, for both civil and physical times (i.e.: datetimes and epoch-second timestamps).

This software is proudly ZeroVer <https://0ver.org> right now, as I am rapidly evolving its interfaces and documentation without a compatibility policy yet, trying to make sure I'm comfortable committing to it. But as of today it has 100% test coverage.

elduvelle, to python
@elduvelle@neuromatch.social avatar

Question for :
Getting tired of my version that relies on different versions of Python modules than the ones I need for coding…

What is your favourite for Python (and why?)?

hugovk, to python
@hugovk@mastodon.social avatar

I wrote a thing!

For some reason, EOL Python 3.7 accounts for 23% of downloads from PyPI.

Why so high?

Let's find out which distro is responsible!

https://dev.to/hugovk/why-are-there-still-so-many-downloads-for-eol-python-37-30cp

gabidavila, to python

Friends, now that people are aggregating together, which conferences should I keep an eye on for submissions? My content goes beyond databases fundamentals, language agnostic. I can cover automation, schema tracking, observability, etc.

Also Vector databases.

aeveltstra, to haskell
@aeveltstra@mastodon.social avatar

I may bitch and gripe a bit about the insane learning curve of programming languages like ... but I cut my teeth on and : I've seen worse. Of all the languages I've used, my favorite by far is , but only for processing. What's yours, and why?

SarahKL, to retrocomputing

Hey lovely Mastodon folk. I've just released an HP-35, HP-45, HP-80 simulator called HP-1973 to celebrate the 50th anniversary of the HP-45 calculator. (Free) standalone versions for Mac and WIndows (no need for any Python installation or knowledge) & Python source for Linux. It's been a coding marathon, so it'd mean a lot to me if you could boost this post, so it gets in front of the right people. Download here: https://sarahkmarr.com/retrohp1973.html Enjoy.

scy, to webdev
@scy@chaos.social avatar

I need to convert to and I'm looking for a tool to do that.

The output should

• preserve line breaks in paragraphs
• not contain additional, unnecessary linebreaks (e.g. 4 empty lines between paragraphs)
• be configurable (e.g. whether to use * or _ for emphasis, or * vs - for unordered lists)
• if possible, allow me to hook into details (e.g. to convert <pre class="shell"> to ```sh)

or . Alternatively, what's a really configurable prettifier?

:BoostOK:

yossarian, to programming
pythonbynight, to python
@pythonbynight@fosstodon.org avatar

Did you catch an earlier post by @webology where he advocates for "Online First conferences"?

I chimed in with my 2 cents.

Those two cents turned into a blog post.

https://pythonbynight.com/blog/or-into-and

xahteiwi, to markdown
@xahteiwi@mastodon.social avatar

Hivemind, please help.

One thing that still eludes me is a way to lint files to enforce a one-sentence-per-line rule. This is remarkably nontrivial.

Can somebody point me to such a thing? Ideally in , but I'll take any language (even an emacs minor mode will help).

A bajillion bonus points if the thing can also unwrap wrapped paragraphs and automatically turn them into one sentence per line.

Boosts appreciated, thanks!

https://sive.rs/1s

freemo, to ruby
@freemo@qoto.org avatar

Ya know the more I reflect on the languages I know the more I realize that outside of functional languages none of them really handle immutability well.

Consider that you want most of your objects to be immutable most of the time. Thats all well and good till you realize you want to be able to edit the objects in such a way that it creates duplicates that have some data changed but are likewise immutable.

This tends to stop working, almost entierly, once you get into subclassing. If you parent class has a method that returns a copy of itself with some data modified, this will break in children classes, since you want children classes to return instances of itself, not its parent.

Its not that you cant fix that, but the code gets very ugly very quickly. Generally you are forced to let the code handling the classes do the copying and editing itself, but that is pretty ugly too.

I have had this pattern problem in almost every OO language i messed with, Java, Ruby, Python, etc.

#Ruby #Python #Java #Programming #CS

robinlovelace, to python
@robinlovelace@fosstodon.org avatar

Shout-out to experienced people out there: I've just updated the README of our Geocomputation with Python book and want to get a sanity check. Is this good advice? Thanks to authors @michaeldorman84, @underdarkGIS and @nowosad it's coming together! 🙏 https://github.com/geocompx/geocompy/pull/204

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