swi-mqtt-pack
figlet
swi-mqtt-pack | figlet | |
---|---|---|
2 | 9 | |
5 | 1,304 | |
- | - | |
2.2 | 0.0 | |
almost 1 year ago | 9 months ago | |
C | C | |
MIT License | BSD 3-clause "New" or "Revised" License |
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.
figlet
- ASCII Art: From a Commodity into an Obscurity
-
Useless CLI tools
Figlet: makes big text with ascii art. http://www.figlet.org/
-
Fun and Useful CLI Tools for Linux
Need to change font, size, italics? - Not a problem. The tool knows how to do this simply with argulet.
- figlet – a program for making large letters out of ordinary text
-
Ask HN: What are some interesting examples of Prolog?
figlet is the classic tool to generate these, toilet is a slightly more modern reimplementation with some added features (like color)
http://www.figlet.org/
- Where can I find a text bubble text generator for code comments similar to the link below?
-
ASCII art for semantic code commenting
I love this and I'm going to use it for fancy comments in code and in the browser console. It'd be really cool if you could integrate something like http://www.figlet.org/ for inserting ASCII text art.
I wish I had known about this tool when I building this little browser game https://replit.com/@aMoniker/Gush because all the levels & game objects are generated from multiline strings of ascii symbols, and it just took too long to do manually.
-
Happy 30th Birthday, Linux!
Tip: use figlet next time.
-
Finally switched back to Linux
Terminal programs: Neofetch (Top left), Figlet (Top right), Ranger (Bottom left), Neovim (Bottom right)
What are some alternatives?
ChessPositionRanking - Software suite for ranking chess positions and accurately estimating the number of legal chess positions
neofetch - 🖼️ A command-line system information tool written in bash 3.2+
rhombus-prototype - Brainstorming and draft proposals for Rhombus
venn.nvim - Draw ASCII diagrams in Neovim
gerbil - Gerbil Scheme
figlet-fonts - my collection of figlet / toilet ascii art fonts
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
arttime - arttime is a CLI application that blends beauty of ASCII / text art with functionality of clock / timer / pattern-based time manager in terminal ⏰
libredwg - Official mirror of libredwg. With CI hooks and nightly releases. PR's ok
openbox - Openbox Window Manager (OpenboxWM)
brainfuck-pl - A brainf*ck interpreter in Prolog