Skip to content

Instantly share code, notes, and snippets.

View killerstorm's full-sized avatar

Alex Mizrahi killerstorm

View GitHub Profile
;; -*- lexical-binding: t; -*-
(require 'url)
(defun llm (command)
(interactive "sWhat: ")
(let* ((start (if (use-region-p) (region-beginning) (point)))
(end (if (use-region-p) (region-end) (point)))
(text-before (buffer-substring-no-properties (point-min) start))
(selection (buffer-substring-no-properties start end))
(text-after (buffer-substring-no-properties end (point-max))))

Hello. I want you to emulate SHRDLU behavior. We start with the following initial state:

objects:
  - id: B1
    type: BLOCK
    position: [110, 100, 0]
    size: [100, 100, 100]
    color: RED
  - id: B2
import requests
import yaml
from typing import List, Dict, Optional
class PlanItem:
def __init__(self, id: str, description: str, status: str, subtasks: List['PlanItem'] = None):
self.id = id
self.status = status
self.description = description
import re
from typing import List, Union, Dict, Optional
import yaml
import openai
import requests
MARKER_PREFIX = "///"
class CodeFragment:
def __init__(self, marker: str, description: str, content: str):
override fun createSpecialOperations(position: SpecialTransactionPosition, bctx: BlockEContext): List<OpData> {
if (position == SpecialTransactionPosition.Begin) {
val retval = mutableListOf<OpData>()
val rqs = this.module.query(bctx, "get_auth_requests",
GtvDictionary.build(mapOf()))
for (r in rqs.asArray()) {
val rString = r.asString()
val res = pendingRequests[rString]
@killerstorm
killerstorm / dreddit.md
Last active January 24, 2022 21:17
Dreddit

An architecture for distributed p2p reddit-like thing

Problem?

If you're a reddit user you probably know that from time to time reddit goes slow or even down due to unexpectedly high load (many users trying to use site simultaneously) and after that users create posts like "Fix it! Can't you just buy more servers?". I've found a pretty interesting question in one of those threads once -- why can't we make a distributed, p2p reddit(-like thing) so it won't depend on lots of expensive servers?

As a person who has some clue on how p2p systems work (I've implemented an ED2k client once, for example) I've commented that there are unresolved technical problems. P2P was amazingly successful for some applications, notably, filesharing. But using it for a highly-interactive

const gridSpec: any = [
[{elt: "text", variant: "h1", content: "Issue options"}],
[
[
{
elt: 'form',
children: [
{
elt: 'select', name: "asset", label: "Asset", outChannel: "asset",
<!-- Please do not remove or change this AfD message until the issue
is settled -->
<!-- The nomination page for this article already existed when this
tag was added. If this was because the article had been nominated for
deletion before, and you wish to renominate it, please replace
"page=Technical Itch" with "page=Technical Itch (2nd nomination)"
below before proceeding with the nomination.
-->{{AfDM|page=Technical Itch|logdate=2008 November 29|substed=yes }}
<!-- For administrator use only: {{oldafdfull|page=Technical
Itch|date=29 November 2008|result='''keep'''}} -->

Chromia unofficial technical roadmap 2021 Q1-Q2

Ongoing work

There are features and improvements we started working on in 2020 which haven't been released yet, they are expected to be released in Q1 2021:

  • Postchain synchronization system overhaul. We added possibility to sync blockchain from any node which has it (previously it was only possible to sync from current block producers) and increased robustness of sync subsystem. Expected to be released in January.
  • begin_block/end_block hooks. This adds a possibility for a blockchain to automatically perform an action at beginning or end of any block. While this seems like a minor feature, lack of it creates huge issues for dapp developers, e.g. Maker CDPs
0xc07063976e347beaa4573bde1bcee655766391d0
0x864a505af53a397a1567dcdcc1445df3944e27fe
0x32b9b9dc1186f5c94c9b8d9198e6ae071e45a007
0xb1a5b5c6f23b57030849a6dd889bc0162ba8e280
0xbdbed46cc97e236af73736f30c3193068f6c4902
0x279d8bd11dd947f3daeb5787e0ce4d0fd798ad39
0x9ef165fcd21101136a3d586e8824551be7579a44
0x0c61ad756e686c2be8873f6e382c44a1b74a4ee3
0x70e27ab2ce035ae1b1a895643e5552a91d0244b9
0x44b8b378e6a6b69d44cb4afc7ba7af9c58b684e8