python

Back Open Paginator
29.03.2026 11:08
oots (@oots@infosec.exchange)

After a few months of break, over the last week or so I finally had some time to work on my pet programming language #Rocket again.

My main goal was to fix a bug that prevented some built-in types (ints, booleans, ...) from being used as instances of a protocol (as in #Python - think interfaces in #Java, traits in #Rust or ...). The reason was that for these types I didn't have any runtime type info. If they were stored in a variable (or function parameter) of type `MyProtocol` that was that - there was no more information on the type except just that: It implements the protocol `MyProtocol`. No way of knowing the actual type or finding the implementation of the methods required by the protocol.

So I had to refactor how ints and booleans were represented internally. As you can imagine, that's a change quite deep in the language. It affected arrays (which store their length - an integer), strings (which under the hood ultimately are arrays of integers) and some other stuff. Changing the representation of booleans required adjustments in parts of the language that deal with booleans: lazily evaluating logical `and`s and `or`s, `if` statements, `while` loops, etc.

Anyway, after the refactoring I think the code is a bit cleaner. And once I had this, fixing the bug was literally a two line change (plus imports and tests).

Also found and fixed another bug: When importing two submodules of the same top-level module (e.g. `import mymodule.submodule_1; import mymodule.submodule_2`) the second import statement used to fail because the name `mymodule` already existed (was already taken) in the code doing the imports (it was created by the first import statement).

And then there was a third bug I introduced in the refactoring of the representation of ints. It lead to `-some_unsigned_int` to be treated as another unsigned int (rather than a signed one) in some regards. My test case converting `-9223372036854775808` (the minimum value a signed 64 bit integer can hold) to a string caught it.

On a side node: I'm so grateful I started writing lots of test cases for this project. The amount of bugs they've caught that would have gone unnoticed otherwise is worth a million. Always write test cases if you care about your software.

#RocketLang




Show Original Post


29.03.2026 11:04
codingmavrick (@codingmavrick@mastodon.world)

Mastering FastAPI Request Bodies: Handling User Profiles and Token Authentication

In 2026, building scalable backend services requires a robust understanding of how API endpoints process complex payloads. This session explores the standard patterns for managing data models and secu...

📺 Watch here: youtube.com/watch?v=ABt48n3S7UA

##FastAPI ##Python ##BackendDevelopment ##APIDesign




Show Original Post


29.03.2026 11:02
habr (@habr@zhub.link)

[Перевод] Где же все эти приложения, создаваемые с помощью ИИ?

Любители вайбкодинга и агентного программирования говорят, что работают в 2, 10, а то и в 100 раз продуктивнее! Один даже разработал с нуля целый браузер . Невероятно! И скептики задают правомерный вопрос: «А где же все эти приложения?» Если пользователи ИИ становятся пусть хотя бы вдвое продуктивнее, то где искать этот двухкратный прирост созданных программ? Все подобные вопросы исходят из предположения, что миру нужно больше ПО, и если оно станет дешевле в производстве, то и создавать его будут больше. Так что, если вы с этим предположением согласны, то где же все эти дополнительные программы, которые можно было бы отнести к «эффекту ИИ»? В их поиске мы заглянем в PyPi, главный репозиторий пакетов Python. Он большой, публичный и регулярно измеряется, так что в нём должен быть заметен хоть какой-то эффект от появления ИИ.

habr.com/ru/companies/ruvds/ar

#ruvds_перевод #искусственный_интеллект #вайбкодинг #агентное_программирование #разработка_с_помощью_ии #pypi #python




Show Original Post


29.03.2026 11:00
PythonPeak (@PythonPeak@mastodon.social)

How to Iterate Two Lists in Parallel

zip() pairs them. No range(len). Clean. Pythonic. One function.

#python #zip #iterate #parallel #howto

youtube.com/watch?v=EM-xUp7TclQ




Show Original Post


29.03.2026 10:17
247CodeGirl (@247CodeGirl@mastodon.social)

Season 1 Lesson 11 Part 9 - Your First Steps in Python Python List Mutability Core Data Handling Skills





Show Original Post


29.03.2026 09:37
sayzard (@sayzard@mastodon.sayzard.org)

[CPython 3.15의 JIT, 다시 궤도에 오르다

CPython 3.15의 JIT가 macOS AArch64에서 테일 콜링 인터프리터 대비 11~12%, x86_64 Linux에서 5~6% 빨라지며 성능 목표를 조기 달성했다. 주요 스폰서 철수 이후에도 커뮤니티 주도 방식으로 전환해 신규 기여자를 늘리고 버스 팩터를 낮췄으며, 세부 작업 분해와 측정 인프라(doesjitgobrrr.com)가 개발 속도와 품질 개선에 크게 기여했다. 또한 트레이스 레코딩, 참조 카운트 제거, 듀얼 디스패치 같은 설계 선택이 JIT 성능 향상의 핵심 요인으로 작용했고, 프리 스레딩은 3.15/3.16을 목표로 계속 진행 중이다.

news.hada.io/topic?id=27971

#cpython #python #jit #performance #compiler




Show Original Post


29.03.2026 09:32
habr (@habr@zhub.link)

Как мы хакнули ИИ-бенчмарк PAC1 без нейросетей

Недавно я участвовал в корпоративном хакатоне по обходу ИИ-песочниц. Задача: пройти закрытый бенчмарк PAC1 , где ИИ-агенту нужно работать с виртуальной файловой системой (чтение логов, поиск файлов, отправка писем) и обходить ловушки безопасности (Indirect Prompt Injections). Но реальность оказалась суровой: хваленые reasoning-модели постоянно галлюцинировали, ломали структуру JSON на выходе (выдавая свои "мысли" вместо чистого ответа) и просто сжигали бюджет на API, зацикливаясь на одной ошибке. Потратив часть бюджета впустую, я решил: если ИИ не справляется, мы заменим его на старый добрый хардкод . Так родился концепт Zero-Cost Agent — алгоритмического лома, который симулирует поведение нейросети.

habr.com/ru/articles/1016442/

#LLM #ИИагенты #Red_Teaming #prompt_injection #Python #парсинг #хакатон #уязвимости_ИИ #json




Show Original Post


29.03.2026 09:27
andros (@andros@activity.andros.dev)

Fine! After getting 12k visits in less than a day with the article https://en.andros.dev/blog/aa31d744/from-zero-to-a-rag-system-successes-and-failures/ , with 100 comments on Hacker News (and 1 on my website), here is a technical summary of the first few hours:

- Nginx cache solved the 99% of the problems (/media/ , /static/ and HTML render).
- ASGI, with a WebSocket server, worked fine.
- Django performed 100% well
- Django LiveView, with 130 parallel users, worked... surprisingly well. I'm surprised myself!

My server has specifications similar to a Raspbery Pi 4. Don't overthink it: Django + Nginx + Cache -> It is easy to develop and performs well.

#django #python #nginx #djangoliveview




Show Original Post


29.03.2026 09:13
codingmavrick (@codingmavrick@mastodon.world)

Developing a Robust CRUD Application with FastAPI and SQLAlchemy: A Comprehensive Tutorial

In 2026, the demand for high-performance, asynchronous web services continues to grow, making FastAPI the industry standard for Python-based backend development. This guide walks you through the essen...

📺 Watch here: youtube.com/watch?v=uGf2YTieHNw

##FastAPI ##SQLAlchemy ##Python ##WebDevelopment




Show Original Post


29.03.2026 06:23
kevinbowen (@kevinbowen@hachyderm.io)

Currently, I use the pip-check package to check for outdated packages by using `pip-check -H`.

Is there a better way of checking for outdated #Python packages installed by pip?

Is there an open issue for adding this functionality to pip that I might follow? Thanks.




Show Original Post


29.03.2026 06:05
jobsfordevelopers (@jobsfordevelopers@mastodon.world)

Shield AI is hiring Staff Engineer, Autonomy - Tactical Behaviors (R3914)

🔧 #cplusplus #python
🌎 Washington, District of Columbia
⏰ Full-time
🏢 Shield AI

Job details jobsfordevelopers.com/jobs/sta
#jobalert #jobsearch #hiring




Show Original Post


29.03.2026 05:10
alecryan (@alecryan@mastodon.social)

Hey, Mastodon! I’m Alec. I’m here in search of meaningful art and community, far from the place where everyone’s an ‘influencer’ and everything is monetized ‘content’ made to appease an algorithm.

I’m a fan of:
- meaningful non-digital experiences📓✍️
- #ownedmedia 💿
- #ultimatefrisbee 🥏
- the #cubs , #49ers , #warriors & #valkyries

Currently learning #python for #dataanalytics.

With the state of things in the States right now I’m glad to be finally be here. #introduction #firstpost




Show Original Post


1 2 3 4 5 6 7 8 9 10 11 12 ...1357
UP