Oh look, someone found a way to scan the Ruby stack sans GVL! 🎉 Now we can all marvel at the thrilling saga of non-blocking stack profiling... because that's exactly what the world was waiting for, right? 🙄 Meanwhile, #GitHub is still trying to convince us that #AI will somehow make bad code better. 😂
https://github.com/yfractal/blog/blob/master/blog/2025-01-15-non-blocking-stack-profiler.md #RubyStackProfiling #NonBlocking #CodeQuality #TechHumor #HackerNews #ngated
blog/blog/2025-01-15-non-blocking-stack-profiler.md at master · yfractal/blog

Contribute to yfractal/blog development by creating an account on GitHub.

GitHub

Пример HTTP-сервера на PHP с использованием файберов. Улучшенная версия

В статье Пример HTTP-сервера на PHP с использованием файберов / Хабр краеугольным камнем организации обработки HTTP-соединений является функция socket_select() , которая имеет значительное ограничение - максимальное значение дескриптора, которое можно добавить в любой из трёх аргументов данной функции составляет 1024. Данный лимит определяется константой FD_SETSIZE, для увеличения которой придётся сконфигурировать системные лимиты и как минимум пересобрать интерпретатор PHP, что нецелесообразно и может создать эксплуатационные проблемы. К тому же, производительность функции select() , обёрткой над которой является функция socket_select(), значительно проседает при ощутимом увеличении значения константы FD_SETSIZE. В данной статье я постараюсь продемонстрировать альтернативу, позволяющую избавить пример из предыдущей статьи от данного ограничения.

https://habr.com/ru/articles/895580/

#php #fiber #nonblocking

Пример HTTP-сервера на PHP с использованием файберов. Улучшенная версия

В статье Пример HTTP-сервера на PHP с использованием файберов / Хабр краеугольным камнем организации обработки HTTP-соединений является функция socket_select() , которая имеет значительное ограничение...

Хабр

Argh, I'm refactoring some old Rust code to test it better, and https://github.com/rust-lang/rust/issues/100013 is not letting me use generics to invert dependencies in order to inject some test code into an async function.

I thought I was being such a clever clogs. As I swore in the comment on the offending function, Buttmuppets!

This bug with lifetimes and generic associated types is really unpleasant to discover on a Sunday. Butt. Muppets.

#rust #gat #dry #DependencyInjection #test #async #nonblocking

Unexpected higher-ranked lifetime error in GAT usage · Issue #100013 · rust-lang/rust

I tried this code: #![feature(generic_associated_types)] #![feature(type_alias_impl_trait)] use std::future::Future; pub trait FutureIterator: 'static { type Iterator; type Future<'s, 'cx>: Future<...

GitHub

Пример HTTP-сервера на PHP с использованием файберов

Платформа PHP часто подвергается критике за отсутствие встроенных возможностей для создания конкурентных приложений. В версии 8.1 был добавлен класс Fiber , который, согласно RFC , должен упростить создание конкурентных приложений. Однако, материалов, демонстрирующих использование данного функционала для построения приложений практически нет, напротив, говорится, что файберы - это функционал, предназначенный для использования разработчиками фреймворков и приводятся какие-то малоинформативные отрывки кода. В этой статье будет продемонстрирован концептуальный пример конкурентного приложения на PHP с использованием файберов.

https://habr.com/ru/articles/866254/

#php #fiber #nonblocking

Пример HTTP-сервера на PHP с использованием файберов

Платформа PHP часто подвергается критике за отсутствие встроенных возможностей для создания конкурентных приложений. В версии 8.1 был добавлен класс Fiber , который, согласно RFC , должен упростить...

Хабр

Arduino desde cero en Español - Capítulo 80 - Código sin bloqueo y Librería TimeAlarms

El delay() es muy útil pero en ciertas ocasiones genera complicaciones al detener el flujo del programa, por eso analizaremos cómo realizar código sin bloqueo (non-blocking) con la función millis() y demostraremos en la práctica sus beneficios.
También veremos la librería TimeAlarms para establecer fácilmente timers o temporizadores para tareas programadas de corta y larga duración con el RTC incorporado en Arduino.

#CodigoSinBloqueo
#Nodelay
#Nonblocking

arduino sin delay
arduino millis
multitareas en arduino
función millis arduino
temporizador en arduino
timealarms arduino
timelib arduino
reloj en tiempo real arduino

Capítulo 38 (RTC):
https://www.youtube.com/watch?v=ZOMXEYuQwwY

Capítulo 58 (Timelib):
https://www.youtube.com/watch?v=CDt1Wlc5rHw

Código fuente de los programas vistos en:
https://github.com/bitwiseAr/Curso-Arduino-desde-cero/

https://www.youtube.com/watch?v=tdFsSo5LVhg

Arduino desde cero en Español - Capítulo 38 - Reloj de Tiempo Real (RTC) DS3231 bus I2C

YouTube

I rewrote my #foss implementation of a #python #multipart form data parser as a #sansio (push based #nonblocking ) parser, and it is now not only suitable for #async applications, but also 2x to10x faster than the old (blocking) implementation. Was a ton of work, but totally worth it. Release will follow later this week.

https://github.com/defnull/multipart/pull/52

WIP: New push based (non-blocking) parser by defnull · Pull Request #52 · defnull/multipart

This PR introduces a new PushMultipartParser that avoids any form of (blocking) IO, which allows it to be used in async contexts. It is also significantly faster (x2 - x10) and less susceptible for...

GitHub

Even though I came to terms with async functions with years, I still can't shake the feeling that something wrong there. 😏

#async #blocking #nonblocking #programming #meme

"Slash your code’s carbon footprint"

It's an interesting article. Yet, none of the three interviewees say anything about #nonblocking #multithreading.

https://www.linkedin.com/pulse/slash-your-codes-carbon-footprint-github/

In my experience you won't find both a simpler and more effective way to achieve that than by using the #ActorModel. Using actors, you aren't burning multicore waiting on many-object cascading calls used to complete larger tasks.

1>

Slash your code’s carbon footprint

From smart meters that save electricity at home to smart grid technologies that enable utilities to route renewable energy to the right places at the right time, software is a key part of building a green future. But running software is also energy-intensive.

#Nonblocking #udp based bitstreams will decrease #website / #application loading times over the internet.

#HTTP/3 is the designated name for the coming next version of the #protocol that is currently under #development within the #QUIC working group in the #IETF

https://www.youtube.com/watch?v=idViw4anA6E

HTTP/3 - HTTP over QUIC is the next generation by Daniel Stenberg

YouTube