Skip to content

Instantly share code, notes, and snippets.

View yrashk's full-sized avatar
🎯
Being productive

Yurii Rashkovskii yrashk

🎯
Being productive
View GitHub Profile
@yrashk
yrashk / SCM_RIGHTS.md
Created March 3, 2023 14:19 — forked from kentonv/SCM_RIGHTS.md
SCM_RIGHTS API quirks

As tested on Linux:

  • An SCM_RIGHTS ancillary message is "attached" to the range of data bytes sent in the same sendmsg() call.
  • However, as always, recvmsg() calls on the receiving end don't necessarily map 1:1 to sendmsg() calls. Messages can be coalesced or split.
  • The recvmsg() call that receives the first byte of the ancillary message's byte range also receives the ancillary message itself.
  • To prevent multiple ancillary messages being delivered
@yrashk
yrashk / 0_motd.sql
Last active March 23, 2023 03:39
A micro web app example for Omnigres (https://github.com/omnigres/omnigres) (README.md candidate)
create table if not exists motd
(
id int primary key generated always as identity,
content text,
posted_at timestamp default now()
);
create or replace function show_motd() returns setof omni_httpd.http_response as
$$
select
@yrashk
yrashk / requires.diff
Last active June 18, 2023 01:11
requires CE for CLIPS
commit 41434dc598adef1b1275966c70eb85a0e9caa5f6
Author: Yurii Rashkovskii <[email protected]>
Date: Sat Jun 17 18:10:44 2023 -0700
Problem: forward chaining in CLIPS
This makes creating systems that drive for an outcome much more
difficult as forward chaining is inherently reactive and doesn't tell
the engine which facts would drive the rules to expected completion.
@yrashk
yrashk / demo.sql
Last active October 28, 2023 16:07
Omnigres Python and Flask experience: Early Preview (Oct 23, 2023) https://www.loom.com/share/b4701cbc77e941919cd5dbff7b15465e
--- omni_schema[[ignore]]
---
--- NB: most, if not all of this will be handled by the upcoming [CLI] tooling
---
-- Extensions
create extension if not exists omni_schema cascade;
create extension if not exists omni_python cascade;
create extension if not exists omni_httpd cascade;