home.social

#golang — Public Fediverse posts

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

  1. Сторож на ESP32-CAM

    # Сторож на ESP32-CAM Возникла следующая практическая задача: в ограниченном пространстве (узком коридоре, лестничном пролете или тамбуре), отследить активность, сделать фото пространства и уведомить пользователя, переслав фотографии в телеграм. При этом известно, что в месте наблюдения установлен бытовой датчик движения, который включает освещение.

    habr.com/ru/articles/1082150/

    #IoT #esp32 #esp8266 #home #go #golang #backend #ios #k8s #kubernetes

  2. pwgen

    E saiu o gerador de senhas, tava precisando disso, ficou bom ;)

    url longa

    https://pwgen.gutocarvalho.net

    url curta

    https://pwgen.gcn.sh

    usando via curl

    sem parâmetros

    curl pwgen.gcn.sh

    opções

    Gerando apenas com números

    curl pwgen.gcn.sh/pin?len=6

    gerando alfanumérica

    curl pwgen.gcn.sh/alnum?len=24

    gerando aleatória

    curl "pwgen.gcn.sh /random?len=20&symbols=1&exclude=@/\$;"

    gerando algo fácil de lembrar

    curl "pwgen.gcn.sh/memorable?words=4&sep=-"

    #Golang #ClaudeCode

  3. I've been using #pprof for years now, and I still can't believe the terminology used all over this tool and its docs isn't just some elaborate joke.

    #golang #cum #largecumvalue

  4. We're hiring a Senior Platform Engineer (Go / MySQL).

    You’ll work on the infrastructure behind Slumber and Deep Sleep Sounds, helping keep our systems reliable for millions of listeners and building the next phase of our audio platform. slumberstudios.com/

    We’re looking for someone with strong production experience in Go, MySQL, and operating reliable systems at scale.

    Private reply me! Contractors / Freelancers only please.

    #hiring #golang #mysql

  5. Падающая сборка, и это я её просил

    Три способа тихо сломать приложение сборкой зависимостей: два пула к базе, не тот кэш, разъехавшиеся ветки конфигурации. Компилятор их не ловит — типы верные. Рантайм-контейнеры ловят половину и приносят свои отказы. Про diogen — compile-time DI для Go: внедрение зависимостей на этапе компиляции, обычный Go-код на выходе, без рантайм-контейнера и без рефлексии.

    habr.com/ru/articles/1082060/

    #dependency_injection #внедрение_зависимостей #di #go #golang #кодогенерация #wire #fx #diogen #gorib

  6. I've been neck deep in the PNG spec writing the metadata decoder/encoder for EXIF, XMP, IPTC, and native text. I do enjoy me some byte-level work.

  7. Валидатор не нашёл поле is_admin, а Go его нашёл: пять ошибок при работе с JSON

    Один и тот же JSON может привести систему к разным выводам. Валидатор пропустит поле, которое Go‑сервис спокойно прочитает, nil ‑слайс превратится в неожиданный для клиента null , а ошибка в имени параметра останется незамеченной до самого продакшена. Разбираем пять случаев, где поведение encoding/json в Go способно создать расхождение между компонентами системы, и смотрим, что меняет переход на encoding/json/v2 . Узнать детали

    habr.com/ru/companies/otus/art

    #Go #Golang #JSON #API #backend #микросервисы #валидация_данных #сериализация #безопасность_приложений #разработка_ПО

  8. NginXplorer: Because Spinning Up a 2GB Grafana Stack Just to Watch Nginx Logs is Madness

    It usually starts with an innocent thought on a Friday evening. You’re logged into a low-powered VPS or your homelab machine, and you notice your blog is feeling a bit sluggish. Or maybe you noticed a suspicious spike in inbound network bandwidth and you just want to know: Who is hammering my web server right now, what URLs are they hitting, and how badly is my upstream PHP-FPM or reverse proxy sweating? Naturally, you look at your options in 2026: The “Modern Cloud-Native” […]

    schulz.dk/2026/09/14/nginxplor

  9. Most guides I found on Go backend services cover the code inside the service, with little on the production problems around it: configuration, lifecycle, observability, packaging, deployment.
    My new guide, Building a Production REST API in Go, covers all of these alongside a working example service: tecnick.com/guides/go-rest-api/
    #golang #restapi #backend #softwareengineering

  10. Hey #golang folks, I have a service listening on some port (say 4321) and the #systemd service file has
    ```
    SocketBindAllow=tcp:4321
    SocketBindDeny=any
    ```

    When my service makes an _outgoing_ connection by calling
    ```
    var dialer net.Dialer
    dialer.DialContext(ctx, "tcp", "somehost.example.com:5678")
    ```
    the service gets a permission error for violating the SocketBind* systemd restrictions.

    But only when using the cgo resolver. Setting `GODEBUG=netdns=go` fixes the error. So what is the cgo resolver doing that requires binding a socket?

  11. Hey folks, I have a service listening on some port (say 4321) and the service file has
    ```
    SocketBindAllow=tcp:4321
    SocketBindDeny=any
    ```

    When my service makes an _outgoing_ connection by calling
    ```
    var dialer net.Dialer
    dialer.DialContext(ctx, "tcp", "somehost.example.com:5678")
    ```
    the service gets a permission error for violating the SocketBind* systemd restrictions.

    But only when using the cgo resolver. Setting `GODEBUG=netdns=go` fixes the error. So what is the cgo resolver doing that requires binding a socket?

  12. Hey #golang folks, I have a service listening on some port (say 4321) and the #systemd service file has
    ```
    SocketBindAllow=tcp:4321
    SocketBindDeny=any
    ```

    When my service makes an _outgoing_ connection by calling
    ```
    var dialer net.Dialer
    dialer.DialContext(ctx, "tcp", "somehost.example.com:5678")
    ```
    the service gets a permission error for violating the SocketBind* systemd restrictions.

    But only when using the cgo resolver. Setting `GODEBUG=netdns=go` fixes the error. So what is the cgo resolver doing that requires binding a socket?

  13. Hey #golang folks, I have a service listening on some port (say 4321) and the #systemd service file has
    ```
    SocketBindAllow=tcp:4321
    SocketBindDeny=any
    ```

    When my service makes an _outgoing_ connection by calling
    ```
    var dialer net.Dialer
    dialer.DialContext(ctx, "tcp", "somehost.example.com:5678")
    ```
    the service gets a permission error for violating the SocketBind* systemd restrictions.

    But only when using the cgo resolver. Setting `GODEBUG=netdns=go` fixes the error. So what is the cgo resolver doing that requires binding a socket?

  14. Hey #golang folks, I have a service listening on some port (say 4321) and the #systemd service file has
    ```
    SocketBindAllow=tcp:4321
    SocketBindDeny=any
    ```

    When my service makes an _outgoing_ connection by calling
    ```
    var dialer net.Dialer
    dialer.DialContext(ctx, "tcp", "somehost.example.com:5678")
    ```
    the service gets a permission error for violating the SocketBind* systemd restrictions.

    But only when using the cgo resolver. Setting `GODEBUG=netdns=go` fixes the error. So what is the cgo resolver doing that requires binding a socket?

  15. Trying to understand #golang. It seems to have quite some "implicit (and short) is better than explicit (and longer)"-features 🙄

  16. WGX is now ihasvpn, and it's been rewritten from scratch.

    The old WGX was a Bash installer that assembled a VPN on your host. The new one is a WireGuard server of its own: one static Go binary in one container, driving kernel WireGuard over netlink, with a web console built in.

    Free software, AGPL-3.0.

    jcoffey.dev/articles/wgx-is-no

    #WireGuard #SelfHosted #Golang #OpenSource #VPN

  17. WGX is now ihasvpn, and it's been rewritten from scratch.

    The old WGX was a Bash installer that assembled a VPN on your host. The new one is a WireGuard server of its own: one static Go binary in one container, driving kernel WireGuard over netlink, with a web console built in.

    Free software, AGPL-3.0.

    jcoffey.dev/articles/wgx-is-no

    #WireGuard #SelfHosted #Golang #OpenSource #VPN

  18. WGX is now ihasvpn, and it's been rewritten from scratch.

    The old WGX was a Bash installer that assembled a VPN on your host. The new one is a WireGuard server of its own: one static Go binary in one container, driving kernel WireGuard over netlink, with a web console built in.

    Free software, AGPL-3.0.

    jcoffey.dev/articles/wgx-is-no

    #WireGuard #SelfHosted #Golang #OpenSource #VPN

  19. The payload size in Kb is the size of the resulting compiled binary for each case, except for iual, of course, which is interpreted and JIT compiled.

    #ual #uallang #rustlang #golang #foss #compsci #programming #wasm #wasi

  20. I added Rust to the list of tracked runtimes in this tracker tool for the ual backends, showing perfect semantic parity between the different systems. Not trivial at all, especially for the intensive concurrency tests, they behave identically in vastly different runtime environments.

    This can be understood as validation of the ual concurrency model without mapping 1-to-1 to any one of the backends, with its own expressiveness, consistency, and semantic soundness.

    #rustlang #golang #ual #uallang #foss #compsci #programming #wasm #wasi #rust

  21. This is the architecture coverage of zenox, the new assembler/backend for the language ual as it currently stands.

    #ual #uallang #forth #golang #foss #rustlang #compsci #programming

  22. @dngrs Last update, I tracked down the bug, I can confirm the bug is not ual itself, but the runtime binary generated by TinyGo, and the TinyGo team have been sitting on a bug report by jakebailey for about four years, possibly unable to reproduce it because it's a strange edge case.

    What did I do: I added feature flags to ual, so it doesn't generate the shape of code that trips the WASM emitter causing the browser to panic. If they ever apply the jakebailey patch, the workaround can be lifted and the feature flag removed in a future ual version.

    Thanks for reporting! With your help, I can now safely say that the existing ual code runs correctly on the browser, not only with WASI and wasmtime.

    Whenever you are ready to use it for something cool, I standby ready to adjust and produce a new release that you can use.

    #ual #uallang #compsci #programming #wasm #wasi #forth #rustlang #golang #foss

  23. Hello world, from zenox, the new ual backend which can now emit mach-O binaries for XNU/darwin on ARM64 in addition to ELF for linux amd64, and ELF for linux ARM64.

    Lots of work to do before we can have a usable standard library and a runtime scheduler.

    But so far so good, this is ual, zenox, and the kernel alone.

    #ual #uallang #compsci #zenox #programming #rustlang #golang #foss

  24. I wrote a quick and dirty shim for web browsers to display terminal output with ANSI colours and cursor positioning, just a small subset of ANSI codes that get used most often.

    With that the WASM code genererated by ual through the TinyGo backend enables small ual programmes to run in the browser –at least most of the currently existing 90+ tests– and now also display output without need of DOM manipulation.

    Quite lovely, if you ask the parent of the child, it works.

    #ual #tual #compsci #programming #forth #golang #rustlang #wasm #wasi

  25. This is the status of the new zenox backend for #uallang, work in progress. Zenox front-end producing ELF binaries for trivial programs on Linux only, a little milestone that proves the architecture is sound, but still a long way from being able to compile real ual programmes without the Go/Rust crutches.

    Should be able to produce simple running code and maybe simple little toy tools before this year ends. The first glimpses of something useful in 2027.

    #ual #uallang #programming #compsci #asm #assembler #rustlang #golang #foss #forth #rust #assembly

  26. If you came here for #ual, and you wonder what's all this ancient stuff, don't despair, it makes sense! In my brain! 🤣

    Here's progress in the ual direction. Subsets of both #AMD64 and ARM64 are working.

    I scaffolded a new front-end called ZENOX which can fold in the new AMD64 and #ARM64 backends, and now the Z80 backend as well, along with the Z80N extensions.

    The Z80+Z80N assembler Zenas remains as-is with its own front-end for #Z80 developers. I reuse the assembler package exported by Zenas in the ZENOX frontend.

    Everything works! And hopefully the language ual gets its own little toolchain to produce at least simple binaries without needing Rust or Go for bootstrapping. The crutches will remain for some time, the goal is for having the architecture proven end-to-end before this year ends 🙂

    #ual #programming #compsci #assembler #assembly #forth #golang #rustlang