- How to Adjust X and Y Axis Scale in Arduino Serial Plotter (No Extra Software Needed)Posted 3 months ago
- Elettronici Entusiasti: Inspiring Makers at Maker Faire Rome 2024Posted 3 months ago
- makeITcircular 2024 content launched – Part of Maker Faire Rome 2024Posted 5 months ago
- Application For Maker Faire Rome 2024: Deadline June 20thPosted 7 months ago
- Building a 3D Digital Clock with ArduinoPosted 12 months ago
- Creating a controller for Minecraft with realistic body movements using ArduinoPosted 1 year ago
- Snowflake with ArduinoPosted 1 year ago
- Holographic Christmas TreePosted 1 year ago
- Segstick: Build Your Own Self-Balancing Vehicle in Just 2 Days with ArduinoPosted 1 year ago
- ZSWatch: An Open-Source Smartwatch Project Based on the Zephyr Operating SystemPosted 1 year ago
Microsoft open-sources P language for IoT
Microsoft’s P language, for asynchronous event-driven programming and the IoT (internet of things), has been open-sourced.
Geared for embedded systems, device drivers, and distributed services, P is a domain-specific language the compiles to and interoperates with C, which itself has been commonly leveraged in embedded systems and the IoT. “The goal of P is to provide language primitives to succinctly and precisely capture protocols that are inherent to communication among components,” said Ethan Jackson and Shaz Qadeer of Microsoft, in a tutorial on the language.
Microsoft has described P as offering “safe” event-driven programming. In their tutorial, Jackson and Qadeer say P programs have a computational model that features state machines communicating via messages, an approach commonly used in embedded, networked, and distributed systems.
Each state machine has an input queue, states, transitions, event handlers, and machine-local store for a variables collection. State machines run concurrently, with each executing an event loop that de-queues a message from the input queue. The state machine also examines the local store, sends messages between machines, and can create new machines. “In P, a send operation is non-blocking; the message is simply executed into the input queue of the target machine.” A program features a collection of event and machine declarations.
Microsoft also offers P#, an extension to C# that targets asynchronous programming, as open source. And in June, Microsoft open-sourced Checked C, a modified version of C that adds new syntax and typing to the C language, with the intent of improving safety in C.
Source: InfoWorld