News for hackers. Stuff that matters.
Re:Show HN: MicroLua – Lua for the RP2040 Microcontroller by westurner on Saturday November 04, 2023 @12:47AM (#38138230)
OpenWRT's LuCI WebUI, Torch ML, and embedded interpreters in game engines are also written in Lua.

Apache Arrow's C GLib implementation works with Lua. From https://news.ycombinator.com/item?id=38103326 :

> Apache Arrow already supports C, C++, Python, Rust, Go and has C GLib support Lua: https://github.com/apache/arrow/tree/main/c_glib/example/lua

LearnXinYminutes Lua: https://learnxinyminutes.com/docs/lua/

OpenWRT is a Make-based Linux distro for embedded devices with limited RAM and flash ROM, x86, and docker. OpenWRT is built on `uci` (and procd and ubusd instead of systemd and dbus). UCI is an /etc/config/* dotted.key=value configuration system which procd sys-v /etc/init.d/* scripts read values in from when regenerating their configuration when $1 is e.g. 'start', 'restart', or 'reload' per sys-v. LuCI is the OpenWRT web UI which is written in Lua; which is now implemented mostly as a JSON-RPC API instead of with server-side HTML templates for usability and performance on embedded devices.

Notes on how to write a LuCI app in Lua: https://github.com/x-wrt/luci/commit/73cda4f4a0115bb05bbd3d1...

applications/luci-app-example: https://github.com/openwrt/luci/tree/master/applications/luc...

openwrt/luci//docs: https://github.com/openwrt/luci/tree/master/docs

https://openwrt.org/supported_devices

It's probably impossible to build OpenWRT (and opkg packages) for an RP2040W.

Re:Show HN: MicroLua – Lua for the RP2040 Microcontroller by mobilio on Saturday November 04, 2023 @04:17AM (#38139068)
Yes, it's impossible (i'm dev on OpenWRT) because it build toolchain first then, Linux kernel, drives and userland apps.
Re:Show HN: MicroLua – Lua for the RP2040 Microcontroller by westurner on Saturday November 04, 2023 @05:29AM (#38139392)
https://github.com/raspberrypi/pico-sdk/ links to a PDF about connecting to the interwebs with a pi pico: "Connecting to the Internet with Raspberry Pi Pico W" https://rptl.io/picow-connect

micropython/micropython//ports/rp2/boards/RPI_PICO_W: https://github.com/micropython/micropython/tree/master/ports...

micropython/micropython//lib: https://github.com/micropython/micropython/blob/master/lib

micropython/micropython//examples/network/http_server_simplistic.py: https://github.com/micropython/micropython/blob/master/examp...

micropython/micropython//examples/network/http_server_ssl.py: https://github.com/micropython/micropython/blob/master/examp...

raspberrypi/pico-sdk//lib: btstack, cyw43-driver, lwip, mbedtls, tinyusb https://github.com/raspberrypi/pico-sdk/tree/master/lib

raspberrypi/pico-examples//pico_w/wifi/access_point/picow_access_point.c: https://github.com/raspberrypi/pico-examples/blob/master/pic...

There's an iperf opkg pkg, or is it just netperf (which works with the flent CLI and GUI)?

raspberrypi/pico-examples//pico_w/wifi/iperf/picow_iperf.c: https://github.com/raspberrypi/pico-examples/blob/master/pic...

raspberrypi/pico-examples//pico_w/wifi/freertos/iperf/picow_iperf.c: https://github.com/raspberrypi/pico-examples/blob/master/pic...

FreeRTOS > Process management: https://en.wikipedia.org/wiki/FreeRTOS#Process_managememt

elf2uf2: https://github.com/raspberrypi/pico-sdk/tree/master/tools/el...