mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.7K
active users

#websockets

2 posts2 participants0 posts today

Today I learned…

1. there's a card game where you complete a task from Unix pipe commands: punkx.org/unix-pipe-game/ (via mamot.fr/@bearstech/1142758430)
2. there's a JavaScript x86 machine emulator so you can play that game without needing a real computer around: bellard.org/jslinux/tech.html
3. that JS VM gets network connectivity because someone decided to make a websocket-based VPN that passes Ethernet frames: benjamincburns.com/2013/11/10/

punkx.orgThe UNIX Pipe Card Game

New Kitten update

kitten.small-web.org

• Added `remove()` method to kitten.Component class. Use this when working with live pages and components and you want to remove a component from the page (or its parent). It will handle removing event listeners for you so you don’t end up with any memory leaks.

• Improved `update()` method so it similarly removes listeners on child components before updating the component itself in case you have class-based child components that will be reinstantiated on render.

• Updated the `send()` methods on `page.everyone` and `page.everyoneElse` so you can pass a swap target to insert the element being streamed to the page before, after, asFirstChildOf, or asLastChildOf another. (This was already there for the page.send() but now the two broadcast objects have the same consistent interface.

The @small-web/kitten npm package (Kitten’s types package) has also been updated to version 5.1.0 to reflect the latest changes.

(Remember that the new class and event-based page and component model is still experimental and largely undocumented and fully backwards compatible with the classic functional way of authoring your page routes and components.)

Enjoy!

:kitten:💕

A quick demonstration of using the State: Overview page in Kitten’s¹ settings while developing to keep an eye on your event and event listener counts to avoid memory leaks.

Notice how the events and listeners counts change as I navigate between the People and Settings pages in my Place² node and that they are consistent. If they were rising as I navigated back and forth I’d know I had a memory leak somewhere.

If you use Kitten’s built-in features (e.g., the `addEventHandler()` method on your `kitten.Component` subclasses, Kitten will handle adding and removing listeners for you automatically during your component’s lifecycle. You can also do so manually in your component’s automatically-called `onConnect()` and `onDisconnect()` event handlers.

This view is useful during development to ensure you don’t have any memory leaks as pages are loaded and unloaded.

vimeo.com/1050714714

¹ kitten.small-web.org
² Place is in early development at the moment (codeberg.org/place/app)

From the @DSLC :rstats:​chives:

:rstats: "Web APIs with R: Find APIs & Communicate with other types of APIs" youtu.be/hDfrbKOMuyU #API #APIs #RStats #graphql #websockets #gRPC

:rstats: "Bayes Rules! MCMC under the Hood" youtu.be/CCpL8IpUTEE #RStats

:rstats: "Probabilty for Data Science: Discrete Random Variables Exercises" youtu.be/xHclZpPPLwA #RStats

Visit dslc.video for hours of new #DataScience videos every week!

youtu.be- YouTubeEnjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.

Pretty soon, you’re going to be able to view your live pages and the events on them in real time while developing Kitten apps.

The improved component model with support for class-based routes (and a server-side component hiearchy that lets you build well-encapsulated components and pages and work in an event-driven way) is coming along nicely and I’m back to writing Place¹ using it.

(In the GIF, you’re looking at Place’s profile settings page. Not shown here but those profile changes reflect in realtime on all open pages. The highlighted piece of code is what streams the event details to the browser.)

¹ codeberg.org/place/app

Feeling more like myself today after getting my ass kicked by this bug for the past few weeks and I’m finally making progress on improving Kitten’s¹ component model.

Soon, you’ll be able to implement page event handlers in an even simpler way than before. Is your connected DOM element named `pixel`? Then export an event handler called `onPixel()` on your page route and it’ll get called when that element triggers its event.

And there’s so much more coming, including a class-based page and component model with DOM-style event bubbling on the server. This should really let you make the most of the Streaming HTML² workflow in Kitten by writing event-driven GUI-like code but for a web app without really caring about the client/server separation.

Need to update the examples, test, test, test, and update docs but this had me stumped for a while now with several false starts and I feel this implementation might just be it 🤞

:kitten: 💕

¹ kitten.small-web.org
² kitten.small-web.org/tutorials

Raspberry Pi Pico Servidor Websockets

En este vídeo explico como podemos crear un servidor websockets con nuestra raspberry pi pico con el cuál podemos conectar desde clientes como puede ser directamente una aplicación de escritorio o web para recibir datos JSON.

youtu.be/U4ikeck1NIo

gitlab.com/raupulus/rpi-pico-s
github.com/raupulus/rpi-pico-s

youtu.be- YouTubeEnjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.

Guess I'm striking out on making my #Django chess game use #Websockets. There are a number of write-ups by people who seem to have done it... I've tried a number of things based on them. And unfortunately, they are all bewildering to me.

If any kind soul would be willing to peek, my "non-websocket", but totally functional project is github.com/ology/django-chess- to see how it can be refactored? I will pay you.

Basically I make a JS post like this, for each move:

github.com/ology/django-chess-

Help? :)

Interactively visualize chess piece threat and protection status - ology/django-chess-inspector
GitHubGitHub - ology/django-chess-inspector: Interactively visualize chess piece threat and protection statusInteractively visualize chess piece threat and protection status - ology/django-chess-inspector