swi-mqtt-pack
endbasic
swi-mqtt-pack | endbasic | |
---|---|---|
2 | 24 | |
5 | 299 | |
- | 1.0% | |
2.2 | 8.4 | |
11 months ago | 5 days ago | |
C | Rust | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
swi-mqtt-pack
-
Ask HN: What are some interesting examples of Prolog?
Not a lot of code but a somewhat different use of Prolog than you're likely to see elsewhere. I used my fork of a MQTT library for Prolog (https://github.com/sprior/swi-mqtt-pack) to implement the central controller for my home automation system. The system responds to MQTT events and then coordinates the appropriate action by sending MQTT messages to other home services. Recent versions of SWI-Prolog also support redis and I've started using that to store device configuration and state between services. The MQTT version is actually a reimplementation of my previous version which used CORBA for inter-service communication.
I don't distribute the home automation code however it's pretty specific to my house. The MQTT library provides some building block examples.
-
Ask HN: Why are you programming your hobby projects in a niche language?
I forked an abandoned implementation of MQTT for SWI-Prolog by olsky, my fork is at https://github.com/sprior/swi-mqtt-pack
Look in the examples directory for some basic pub/sub code.
The Prolog code that runs in my house is pretty specific to my house so I figured the best way to open source things would be as a framework more than an implementation. You can contact me via issues on the github repo and prod me into adding some more advanced examples - I've learned a lot since my last commit on the repo.
I've started using the Redis functionality recently added to SWI-Prolog, so my code now responds to MQTT messages and uses state queried from Redis to help determine what actions (implemented by sent MQTT messages) to send out. The beauty is that since I don't do anything that blocks significantly in the Prolog code it is now single threaded - even the MQTT listening. It still responds quickly enough and is MUCH easier to deal with than multi-threaded.
An example of what I'm doing is I built a bunch of ESP8266/EESP32 display devices that control neopixels/OLED/LCD displays. When one of those devices boots it sends a MQTT message announcing its location and capabilities (display type, bit depth, dimensions). Prolog receives that message and then stores that info in Redis. So that device info is all dynamic.
So then later Prolog might get a notification that something is in the driveway. All by MQTT it requests an image from the appropriate camera, then sends the image off to Sighthound and deepstack image recognition servers. The Sighthound front end sends a message back to Prolog with a description of any vehicle spotted which Prolog then matches against known vehicles. If it determines for example that a Fedex truck is in the driveway then Prolog sends notifications around the house - it queries all the display devices from Redis and then based on the capabilities of each devices creates a JSON formatted MQTT message to send to each announcing the Fedex truck. It then also sends a MQTT message to some Java code that connects with Google and sends a push message to an Android app I wrote that displays the alert on my phone and watch.
Before I switched to MQTT I was using Prolog with CORBA as the message transport and back then I also had Visual Basic and MS Agent as part of the system. One night I got bored and a little while later had 3 Peedy the Parrot characters singing Row Your Boat in a round across three different computers coordinated by Prolog. It was actually only a page worth of custom Prolog code for that.
endbasic
-
Write Your Own Terminal
I can confirm that writing a terminal is fun, for the reasons mentioned in the article: it’s easy to get “self-hosting”, but then the possibilities are endless :)
In my case, this was about creating the terminal for EndBASIC (https://www.endbasic.dev/). I wanted to mix text and graphics in the same console, so I had to ditch Xterm.js and create my own thing. It was really exciting to see graphics rendering mix with text “just fine” when I was able to render the first line.
-
Ask HN: Whats the modern day equivalent of 80s computer for kids to explore?
I tried to set up a Raspberry Pi and configured it to boot into a simple window manager with DosBox full screen by default. I taught my kids to launch games within that and they learned the very basics… but it didn’t stick: they haven’t really gained any interest in how to do other stuff in the shell.
Anyway: check (my own) https://www.endbasic.dev/ which I’ve written precisely for the situation you describe :) You would actually have to /write/ the games first though!
- FLaNK Stack for 25 September 2023
-
EndBASIC
Slightly buried: Apache 2.0, written in Rust, https://github.com/endbasic/endbasic/
Definitely an interesting attempt to cut through layers of abstraction and make something that lets people make the computer do useful/interesting things. No idea how well they realize that vision, of course, but good idea.
-
Does this exist already? A converter from MS BASIC to Rust
Or you could use https://www.endbasic.dev/
-
TwinBASIC is a modern BASIC compiler
Somebody else brought it up in a separate comment, but because you specifically ask about the Raspberry, I'll mention EndBASIC (https://www.endbasic.dev/) here again :)
Supporting this platform has been a primary goal of mine, and in fact, one of the features (GPIO) only works on the Raspberry Pi today :) But there is a long road ahead. My vision is to create a minimal Linux image that boots straight into EndBASIC, and extend EndBASIC to give you more control of the Pi's hardware. The idea is to truly mimic the old C64 experience, but leveraging the power of modern hardware / infrastructure.
-
Learning BASIC Like It's 1983 (2018)
Agree with the author’s thesis of how the folks that “grew with computers” have an advantage over those approaching them now, in terms of understanding the inner workings. I’m not sure that this matters much in terms of solving actual problems though, which is probably a good thing.
But I somehow find it a little bit sad that this is the case, so I’ll plug my own https://www.endbasic.dev/ because it’s very fitting in this context :) I’ve been building it precisely as a way to understand everything that’s going on (although it’s still far from fulfilling that promise).
Also, buried in the article is a reference to the https://10print.org/ book. I recently came across it at HPB and it has been a pretty entertaining read. Couldn’t believe there was so much to write about such a simple little program!
- EndBASIC: "BASIC interpreter + DOS environment, reimagined."
What are some alternatives?
ChessPositionRanking - Software suite for ranking chess positions and accurately estimating the number of legal chess positions
ClassicUO - ClassicUO - an open source implementation of the Ultima Online Classic Client.
rhombus-prototype - Brainstorming and draft proposals for Rhombus
mp4 - MP4 library, CLI tool, server
gerbil - Gerbil Scheme
fruit-economy
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
soli - Solidity REPL
libredwg - Official mirror of libredwg. With CI hooks and nightly releases. PR's ok
cemu - Cheap EMUlator: lightweight multi-architecture assembly playground
brainfuck-pl - A brainf*ck interpreter in Prolog
objstor - object store