home.social

#assert — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #assert, aggregated by home.social.

fetched live
  1. #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. techcrunch.com/2026/06/02/new- #AIagent #AI #ML #NLP #LLM #GenAI

  2. #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. techcrunch.com/2026/06/02/new- #AIagent #AI #ML #NLP #LLM #GenAI

  3. Annalena Baerbock, the President of the UN General Assembly, is calling for significant structural reforms to the UN Security Council. Speaking to Politico, she... news.osna.fm/?p=49011 | #news #assert #baerbock #calls #combat

  4. 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 = odd

    State 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 = even

    See also:
    en.wikipedia.org/wiki/15_puzzle
    en.wikipedia.org/wiki/Parity_o

    #bongardproblem #mathpuzzle #puzzle #visualmath

  5. The Karlspreis (Karl Prize) was presented on Thursday in the Aachen Town Hall's coronation hall to Mario Draghi, the former President of the European Central Ba... news.osna.fm/?p=45946 | #news #assert #calls #draghi #euro

  6. 🚀 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. 🤦‍♂️
    sandordargo.com/blog/2026/03/2 #macro #newfeature #developerhumor #programminglife #runtimevalidation #HackerNews #ngated

  7. 🚀 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. 🤦‍♂️
    sandordargo.com/blog/2026/03/2 #macro #newfeature #developerhumor #programminglife #runtimevalidation #HackerNews #ngated

  8. Franziska Brantner, co‑chair of the Greens, urged Europe to increase its pace and confidence in dealings with U.S. President Donald Trump on digital independenc... news.osna.fm/?p=34572 | #news #amid #assert #digital #europe

  9. Franziska Brantner, co‑chair of the Greens, urged Europe to increase its pace and confidence in dealings with U.S. President Donald Trump on digital independenc... news.osna.fm/?p=34572 | #news #amid #assert #digital #europe

  10. 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.

    #Python #Assert #Mistakes

  11. 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.

    #Python #Assert #Mistakes

  12. The recent US military action against Venezuela has ignited a renewed call within Germany for a significant shift in Europe's geopolitical posture. Omid Nouripo... news.osna.fm/?p=29529 | #news #assert #europe #global #itself

  13. Заменяем лишние if-проверки на assert для инвариантов кода в C/C++

    Многие разработчики привыкли везде ставить if-проверки, даже для условий, гарантированных кодом. Зачем проверять то, что не может нарушиться? Такие проверки создают шум в коде и мусор в релизе. Assert решает эту проблему: документирует допущения и исчезает из финальной сборки. В статье покажу все преимущества assert'ов и предостерегу от подводных камней их использования.

    habr.com/ru/articles/962668/

    #C++ #C #assert #инварианты #ifelse #NDEBUG #Design_by_Contract #код_как_документация

  14. [Перевод] Один assert на тест. А может быть, нет?

    Команда Spring АйО перевела статью эксперта Михаила Поливахи о том, почему правило о единственном assert'е на тест иногда можно и нужно нарушать.

    habr.com/ru/companies/spring_a

    #java #kotlin #assert #test #spring #spring_boot #spring_framework #springboot #testing #testing_strategy

  15. Design by Contract на минималках: пишем assertions и улучшаем устойчивость на Go

    Всем привет! Меня зовут Александр Иванов, я старший разработчик в YADRO, работаю над созданием средств управления элементами опорной сети и пишу на Go. Мы с командой разрабатываем продукт для сервисов сотовой связи — качество нашей работы влияет на пользовательский опыт тысяч людей. Поэтому часто мы ищем решения, как повысить устойчивость работы кода в продакшене. Об одном из таких решений я расскажу в этой статье. Design by Contract — подход к проектированию ПО, в котором взаимодействие компонентов системы основано на контрактах. Контракты описывают ожидания вызываемой и вызывающей функции и улучшают производительность кода.

    habr.com/ru/companies/yadro/ar

    #dbc #design_by_contract #defensive_programming #assertion #assert #продакшен #производительность

  16. 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
    🖱️energy-poverty.ec.europa.eu/no
    ---
    nitter.privacydev.net/EPAH_EU/

  17. Почему мы отказались от выражения «assert» в Python

    В текущем проекте на Python мы практически полностью отказались от использования выражений с ключевым словом assert , и в этой статье я расскажу почему. Рассмотрим кейсы где использование выражений assert уместно, а где оно может выстрелить в ногу, и как этого избежать.

    habr.com/ru/articles/876170/

    #python #assert #exception #исключения #pytest #pydantic #линтер #интерпретатор #баги #ошибки

  18. [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.

    omacronides.com/notes/2024-12-

    #javascript #test #assert #code

  19. [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.

    omacronides.com/notes/2024-12-

    #javascript #test #assert #code

  20. Эволюция Assert'a на примере тестирования вездехода из Звездных Войн

    Привет, Хабр! Меня зовут Михаил Палыга, я инженер в Блоке обеспечения и контроля качества выпуска изменений ПО в РСХБ‑Интех. На проекте для проверки данных мы пользуемся библиотекой AssertJ — Java библиотекой с открытым исходным кодом, используемой для написания гибких, содержательных и легко читаемых проверок в тестах Java. Мы любим использовать цепочки методов в других наших классах, поэтому данная библиотека органично вписалась в код наших тестов. Я опишу, как со временем менялся наш подход к проведению проверок данных и как менялись сами классы проверок. А чтобы было чуть проще и интересней — займемся тестированием чего‑нибудь из вселенной Звездных Войн. Например, протестируем имперский бронированный транспортный вездеход AT‑AT.

    habr.com/ru/companies/rshb/art

    #автоматизация_тестирования #assertj #assert

  21. [Перевод] Soft Assertions в AssertJ

    Бывало ли у вас такое, что тест падает на первом же assertion'e из десяти? Вы исправляете ошибку, запускаете тест снова, и он падает на втором assertion'e. И так десять раз. Выматывает, не так ли? На самом деле, есть способ ускорить этот процесс — использовать Soft Assertions. С их помощью тест выполнится полностью, даже если один или несколько assertion'ов упадут, и вы сразу увидите все ошибки. В новой статье от Михаила Поливахи, эксперта сообщества Spring АйО , вы узнаете, что такое Soft Assertions и как ими пользоваться.

    habr.com/ru/companies/spring_a

    #spring #springboot #java #assert #assertj

  22. 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]: okmij.org/ftp/Scheme/assert-sy
    [2]: codeberg.org/ZelphirKaltstahl/

  23. 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]: okmij.org/ftp/Scheme/assert-sy
    [2]: codeberg.org/ZelphirKaltstahl/

  24. 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

  25. Почему проверять результат вызова malloc c помощью assert плохая идея

    Указатель, который вернула функция malloc, необходимо проверить перед использованием. Неправильным решением будет использовать для этого макрос assert. В этой статье мы разберём, почему это является антипаттерном.

    habr.com/ru/companies/pvs-stud

    #malloc #assert #макросы #си #си++ #c #c++ #качество_кода #нулевые_указатели

  26. 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

  27. 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

  28. Any of my tech friends and colleague have an answer for Simon here?

    mathstodon.xyz/statuses/111108

    I *think* the question is:

    "In #gdb, how do you find the stack from number of a failing #assert ?"

    #C

    CC: @[email protected]

  29. Any of my tech friends and colleague have an answer for Simon here?

    mathstodon.xyz/statuses/111108

    I *think* the question is:

    "In #gdb, how do you find the stack from number of a failing #assert ?"

    #C

    CC: @[email protected]

  30. 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: docs.python.org/3/reference/si

    #python #assert

  31. 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: docs.python.org/3/reference/si

    #python #assert

  32. 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

  33. 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

  34. #assert : to declare with assurance, or plainly and strongly

    - French: affirme

    - Portuguese: afirmar

    - Spanish: afirma

    ------------------

    Word of The Hour's Annual Survey 2020: wordofthehour.org/survey