#assert — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #assert, aggregated by home.social.
-
via #AIFoundry : Build agents you can trust across any framework with open evals and a control standard
https://ift.tt/WPLrZFA
#AI #GenerativeAI #Foundry #MicrosoftFoundry #ASSERT #AC S #AgentControlSpecification #AgentGovernanceToolkit #OpenSource #PolicyDrivenEvaluation #Sa… -
via #AIFoundry : Build agents you can trust across any framework with open evals and a control standard
https://ift.tt/WPLrZFA
#AI #GenerativeAI #Foundry #MicrosoftFoundry #ASSERT #AC S #AgentControlSpecification #AgentGovernanceToolkit #OpenSource #PolicyDrivenEvaluation #Sa… -
#Microsoft launched #ASSERT, an #opensource framework that simplifies #testing #AI behaviour for specific products or services. ASSERT uses natural-language descriptions to generate tests, score results, and record AI system paths, helping developers ensure their AI behaves as intended. This tool addresses the need for application-specific evaluations, complementing broader, more general evaluations. https://techcrunch.com/2026/06/02/new-microsoft-tool-lets-devs-spin-up-ai-behavior-tests-using-text-descriptions/?AIagents.at #AIagent #AI #ML #NLP #LLM #GenAI
-
#Microsoft launched #ASSERT, an #opensource framework that simplifies #testing #AI behaviour for specific products or services. ASSERT uses natural-language descriptions to generate tests, score results, and record AI system paths, helping developers ensure their AI behaves as intended. This tool addresses the need for application-specific evaluations, complementing broader, more general evaluations. https://techcrunch.com/2026/06/02/new-microsoft-tool-lets-devs-spin-up-ai-behavior-tests-using-text-descriptions/?AIagents.at #AIagent #AI #ML #NLP #LLM #GenAI
-
CW: Solution to my BP 59
Solution to my BP 59: the left boxes represent 15 puzzle states that can be solved. The configurations in the boxes on the right can't be solved.
The 15 puzzle moves invariant:
"The invariant is the parity of the permutation of all 16 squares plus the parity of the taxicab distance (number of rows plus number of columns) of the empty square from the lower right corner. This is an invariant because each move changes both the parity of the permutation and the parity of the taxicab distance."
I've found the parity with a little Python function:
def permutation_parity(perm):
n = len(perm)
#assert sorted(perm) == list(range(1, n + 1))
n_inversions = 0
for i in range(n):
for j in range(i + 1, n):
if perm[i] > perm[j]:
n_inversions += 1
return 'even' if n_inversions % 2 == 0 else 'odd'Detailed box contents:
State of Box 2:
(3, 11, 1, 15)
(7, 6, 4, 9)
(8, 12, 0, 2)
(13, 14, 10, 5)
permutation = odd
taxicab_distance = 1 + 1 = 2 = even
odd + even = oddState of Box 8:
(5, 12, 11, 15)
(13, 4, 7, 1)
(2, 0, 14, 6)
(3, 9, 10, 8)
permutation = odd
taxicab_distance = 2 + 1 = 3
odd + odd = evenSee also:
https://en.wikipedia.org/wiki/15_puzzle
https://en.wikipedia.org/wiki/Parity_of_a_permutation -
🚀 New #C++26 feature: a user-friendly #assert macro! Because, obviously, developers have been desperately waiting for a fluffy, hand-holding version of assert to validate the runtime conditions of their existential dread. 🙄 So, next time your code implodes, at least it will do so with a polite apology. 🤦♂️
https://www.sandordargo.com/blog/2026/03/25/cpp26-user-friendly-assert #macro #newfeature #developerhumor #programminglife #runtimevalidation #HackerNews #ngated -
🚀 New #C++26 feature: a user-friendly #assert macro! Because, obviously, developers have been desperately waiting for a fluffy, hand-holding version of assert to validate the runtime conditions of their existential dread. 🙄 So, next time your code implodes, at least it will do so with a polite apology. 🤦♂️
https://www.sandordargo.com/blog/2026/03/25/cpp26-user-friendly-assert #macro #newfeature #developerhumor #programminglife #runtimevalidation #HackerNews #ngated -
C++26: A User-Friednly assert() macro
https://www.sandordargo.com/blog/2026/03/25/cpp26-user-friendly-assert
#HackerNews #C++26 #UserFriendly #assert #Macro #Cpp26 #HackerNews #Programming
-
C++26: A User-Friednly assert() macro
https://www.sandordargo.com/blog/2026/03/25/cpp26-user-friendly-assert
#HackerNews #C++26 #UserFriendly #assert #Macro #Cpp26 #HackerNews #Programming
-
Careful when using Python's `assert` statement: Normally you can use parentheses to wrap long lines in Python without using backslashes. For `assert` it doesn't work:
assert(some_condition,
"Some description")This never fails, as Python's `assert` seens an `assert statement with a tuple as condition. This really has to be written like this:
assert some_condition, \
"Some description"I just fell into that trap for you.
-
Careful when using Python's `assert` statement: Normally you can use parentheses to wrap long lines in Python without using backslashes. For `assert` it doesn't work:
assert(some_condition,
"Some description")This never fails, as Python's `assert` seens an `assert statement with a tuple as condition. This really has to be written like this:
assert some_condition, \
"Some description"I just fell into that trap for you.
-
Заменяем лишние if-проверки на assert для инвариантов кода в C/C++
Многие разработчики привыкли везде ставить if-проверки, даже для условий, гарантированных кодом. Зачем проверять то, что не может нарушиться? Такие проверки создают шум в коде и мусор в релизе. Assert решает эту проблему: документирует допущения и исчезает из финальной сборки. В статье покажу все преимущества assert'ов и предостерегу от подводных камней их использования.
https://habr.com/ru/articles/962668/
#C++ #C #assert #инварианты #ifelse #NDEBUG #Design_by_Contract #код_как_документация
-
[Перевод] Один assert на тест. А может быть, нет?
Команда Spring АйО перевела статью эксперта Михаила Поливахи о том, почему правило о единственном assert'е на тест иногда можно и нужно нарушать.
https://habr.com/ru/companies/spring_aio/articles/913130/
#java #kotlin #assert #test #spring #spring_boot #spring_framework #springboot #testing #testing_strategy
-
Design by Contract на минималках: пишем assertions и улучшаем устойчивость на Go
Всем привет! Меня зовут Александр Иванов, я старший разработчик в YADRO, работаю над созданием средств управления элементами опорной сети и пишу на Go. Мы с командой разрабатываем продукт для сервисов сотовой связи — качество нашей работы влияет на пользовательский опыт тысяч людей. Поэтому часто мы ищем решения, как повысить устойчивость работы кода в продакшене. Об одном из таких решений я расскажу в этой статье. Design by Contract — подход к проектированию ПО, в котором взаимодействие компонентов системы основано на контрактах. Контракты описывают ожидания вызываемой и вызывающей функции и улучшают производительность кода.
https://habr.com/ru/companies/yadro/articles/888374/
#dbc #design_by_contract #defensive_programming #assertion #assert #продакшен #производительность
-
RT by @cleanenergy_EU: 📌Open Call: Apply for mentorship programme to address #energypoverty for persons with disabilities.
#ASSERT is looking for 25 pairs of municipalities & intermediaries across five pilot countries🌐Cyprus, France, Greece, Italy, Spain
⏲️Apply by 3 March
🖱️https://energy-poverty.ec.europa.eu/node/219859/latest
---
https://nitter.privacydev.net/EPAH_EU/status/1887785533981520148#m -
Почему мы отказались от выражения «assert» в Python
В текущем проекте на Python мы практически полностью отказались от использования выражений с ключевым словом assert , и в этой статье я расскажу почему. Рассмотрим кейсы где использование выражений assert уместно, а где оно может выстрелить в ногу, и как этого избежать.
https://habr.com/ru/articles/876170/
#python #assert #exception #исключения #pytest #pydantic #линтер #интерпретатор #баги #ошибки
-
[blog] Tester en javasscript
Poursuite de mes réflexions sur la manière de faire des tests unitaires en javascript rapidement sans devoir utiliser de librairies tiers, simplement avec console.assert.
Aujourd'hui, rajouter un peu de couleur dans la console.
-
[blog] Tester en javasscript
Poursuite de mes réflexions sur la manière de faire des tests unitaires en javascript rapidement sans devoir utiliser de librairies tiers, simplement avec console.assert.
Aujourd'hui, rajouter un peu de couleur dans la console.
-
Эволюция Assert'a на примере тестирования вездехода из Звездных Войн
Привет, Хабр! Меня зовут Михаил Палыга, я инженер в Блоке обеспечения и контроля качества выпуска изменений ПО в РСХБ‑Интех. На проекте для проверки данных мы пользуемся библиотекой AssertJ — Java библиотекой с открытым исходным кодом, используемой для написания гибких, содержательных и легко читаемых проверок в тестах Java. Мы любим использовать цепочки методов в других наших классах, поэтому данная библиотека органично вписалась в код наших тестов. Я опишу, как со временем менялся наш подход к проведению проверок данных и как менялись сами классы проверок. А чтобы было чуть проще и интересней — займемся тестированием чего‑нибудь из вселенной Звездных Войн. Например, протестируем имперский бронированный транспортный вездеход AT‑AT.
-
[Перевод] Soft Assertions в AssertJ
Бывало ли у вас такое, что тест падает на первом же assertion'e из десяти? Вы исправляете ошибку, запускаете тест снова, и он падает на втором assertion'e. И так десять раз. Выматывает, не так ли? На самом деле, есть способ ускорить этот процесс — использовать Soft Assertions. С их помощью тест выполнится полностью, даже если один или несколько assertion'ов упадут, и вы сразу увидите все ошибки. В новой статье от Михаила Поливахи, эксперта сообщества Spring АйО , вы узнаете, что такое Soft Assertions и как ими пользоваться.
-
With the help of some people on the #Guile user list (thanks!), I was able to make sense of the `assert` #macro from okmij.org [1]. I wrote a lot of comments and insights, so that at a later point future me or anyone else might find it easier to understand what is going on [2].
#programming #scheme #syntaxrules #assert
[1]: https://okmij.org/ftp/Scheme/assert-syntax-rule.txt
[2]: https://codeberg.org/ZelphirKaltstahl/guile-examples/src/commit/be16f636a6ad637de38c695ba5881cf47fe8df29/macros/assertions/assert.scm -
With the help of some people on the #Guile user list (thanks!), I was able to make sense of the `assert` #macro from okmij.org [1]. I wrote a lot of comments and insights, so that at a later point future me or anyone else might find it easier to understand what is going on [2].
#programming #scheme #syntaxrules #assert
[1]: https://okmij.org/ftp/Scheme/assert-syntax-rule.txt
[2]: https://codeberg.org/ZelphirKaltstahl/guile-examples/src/commit/be16f636a6ad637de38c695ba5881cf47fe8df29/macros/assertions/assert.scm -
Somone just told me they know several people who like guacamole but dislike avocado and such people do not exist, I assert. Please boost, I need to find such a person.
#guacamole #is #avocado! #tiny #bits of #tomato & #some #lime #does #not #change #its #taste #which is #slimy & #gross I #assert #green #goddess #dressing is #okay #though #what #are #your #thoughts -
Почему проверять результат вызова malloc c помощью assert плохая идея
Указатель, который вернула функция malloc, необходимо проверить перед использованием. Неправильным решением будет использовать для этого макрос assert. В этой статье мы разберём, почему это является антипаттерном.
https://habr.com/ru/companies/pvs-studio/articles/794997/
#malloc #assert #макросы #си #си++ #c #c++ #качество_кода #нулевые_указатели
-
Why do some #employees of and #freelancers for #publishers think they should not #assert themselves and set #workload and #scheduling #deadlines? Humans are not robots. They can only do so much work each day. Stand up for yourself! #AmEditing
-
Why do some #employees of and #freelancers for #publishers think they should not #assert themselves and set #workload and #scheduling #deadlines? Humans are not robots. They can only do so much work each day. Stand up for yourself! #AmEditing
-
Any of my tech friends and colleague have an answer for Simon here?
https://mathstodon.xyz/statuses/111108152565102350
I *think* the question is:
"In #gdb, how do you find the stack from number of a failing #assert ?"
CC: @[email protected]
-
Any of my tech friends and colleague have an answer for Simon here?
https://mathstodon.xyz/statuses/111108152565102350
I *think* the question is:
"In #gdb, how do you find the stack from number of a failing #assert ?"
CC: @[email protected]
-
Python's assert is in a very awkward position.
It's a concise keyword for a very common type of validation, but it gets ignored if Python is run in optimised mode. However no one really runs Python in optimised mode so there are arguments on both sides about whether or not you should use assert.
Personally I also dislike that it always throws an AssertionError, so you can't use custom error types for the sake of user friendliness.
More info: https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement
-
Python's assert is in a very awkward position.
It's a concise keyword for a very common type of validation, but it gets ignored if Python is run in optimised mode. However no one really runs Python in optimised mode so there are arguments on both sides about whether or not you should use assert.
Personally I also dislike that it always throws an AssertionError, so you can't use custom error types for the sake of user friendliness.
More info: https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement
-
#Gay at Work: #Queer #People and the #Labor #movement
As a former #labor #organizer, I've been filled with a lot of #hope seeing #workers #standup to their #bosses and #assert their #rights in their #workplaces - especially #queer and #trans workers, without whom the current #surge in the #labormovement simply would not be possible.
#Women #Transgender #LGBTQ #LGBTQIA #Business #Workplace #Unions
https://www.autostraddle.com/gay-at-work-queer-people-and-the-labor-movement/
-
#Gay at Work: #Queer #People and the #Labor #movement
As a former #labor #organizer, I've been filled with a lot of #hope seeing #workers #standup to their #bosses and #assert their #rights in their #workplaces - especially #queer and #trans workers, without whom the current #surge in the #labormovement simply would not be possible.
#Women #Transgender #LGBTQ #LGBTQIA #Business #Workplace #Unions
https://www.autostraddle.com/gay-at-work-queer-people-and-the-labor-movement/
-
Here's my #Limerick about some bad career advice I received back in the '70s. Fortunately, I ignored it.
(I'm using the #MicroPrompt #Assert.)"You aren't assertive enough,"
Warned a lawyer. "You need to be tough
To make it in law.
You've a terrible flaw,
So nix law school. You lack the right stuff!"#Career #Law #Lawyers #Advice #Limericks #Rhyme #Poetry #TinyPoems #SmallPoems #Poets #Prompts #Prompt #WritingPrompt #Poem #AmWriting #MicroPoetry #Writing #WritingCommunity #PoetryCommunity
-
Here's my #Limerick about some bad career advice I received back in the '70s. Fortunately, I ignored it.
(I'm using the #MicroPrompt #Assert.)"You aren't assertive enough,"
Warned a lawyer. "You need to be tough
To make it in law.
You've a terrible flaw,
So nix law school. You lack the right stuff!"#Career #Law #Lawyers #Advice #Limericks #Rhyme #Poetry #TinyPoems #SmallPoems #Poets #Prompts #Prompt #WritingPrompt #Poem #AmWriting #MicroPoetry #Writing #WritingCommunity #PoetryCommunity
-
The acting #director of the #African #NovaScotia #Justice Institute says #federal #funding for the institute will go toward #programming to help #Black people in Nova Scotia better #understand & #assert their #rights .
On Wednesday, the federal #DepartmentOfJustice announced it will spend $607,000 over three years for a Justice #Partnership & #Innovation Program.
https://www.pentictonherald.ca/spare_news/article_499418af-11be-58d6-982b-7a9b5175da4a.html
#decolonization #HumanRights #LegalRights #BlackCanadians #Maritimes #Canada #GoodNews #CanadaLegal #Legal
-
#NippiAlbright said the #IndigenousWomensCollective took a stand to start #CallingOut those who #falsify #Indigenous #identity . The #Indigenous #Womens #Collective are a group of Indigenous women who aim to #protect & #voice the #rights & #injustices of #IndigenousWomen .
In a tweet, the Indigenous Women’s Collective stated they #assert that Indigenous #IdentityTheft is an act of #colonial violence.
https://globalnews.ca/news/9548230/push-saskatchewan-employers-verify-indigenous-claims/amp/
-
#assert : to declare with assurance, or plainly and strongly
- French: affirme
- Portuguese: afirmar
- Spanish: afirma
------------------
Word of The Hour's Annual Survey 2020: https://wordofthehour.org/survey