Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
An experimental rule system handy for intepreting user input, great for adding conversational features to apps, using lessons learned from the message router pattern. I thought of it as I walked around Prague on a sunny Spring day. This is just an experiment and not an official Microsoft project.
Major features of Prague:
Some types of applications you could build with Prague:
npm install
npm run build
(or npm run watch
to build on file changes)npm install prague -S
npm install file:../path/to/your/repo
import { the, stuff, you, want } from 'prague'
or import * as Prague from 'prague'
Let's write a simple bot:
const rule = reply("Hello!");
const rule = rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!"));
const rule = rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!"));
const rule = first(
rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!")),
reply("I don't understand you.")
)
const rule = first(
rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!"));
rule(matchRegExp(/I am (.*)/), reply("Nice to meet you!")),
reply("I don't understand you.")
)
const rule = first(
rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!")),
rule(matchRegExp(/I am (.*)/), match => match.reply(`Nice to meet you, ${match.groups[1]}!`)),
reply("I don't understand you.")
)
const rule = first(
rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!")),
rule(matchRegExp(/I am (.*)/), match => match.groups[1] === 'Bill', match => match.reply(`HELLO MY CREATOR`)),
rule(matchRegExp(/I am (.*)/), match => match.reply(`Nice to meet you, ${match.groups[1]}!`)),
reply("I don't understand you.")
)
const rule = first(
rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!")),
rule(matchRegExp(/I am (.*)/), first(
rule(match => match.groups[1] === 'Bill', match => match.reply(`HELLO MY CREATOR`)),
rule(match => match.reply(`Nice to meet you, ${match.groups[1]}!`))
)),
reply("I don't understand you.")
)
Any Matcher or Handler may optionally return a Promise or an Observable.
Now that you've been introduced to Rules, Matchers, and Handlers, the key helpers, and the type system, we can look into what it takes to build more complex apps using state.
Here I'll talk about Prompts.
FAQs
FP helpers for games and chatbots
The npm package prague receives a total of 15 weekly downloads. As such, prague popularity was classified as not popular.
We found that prague demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.