Monday, October 30, 2023

AI Art?

looks fancy... maybe could be used to sell real estate, regular houses :)

 AI Tool Report

VScode K8s YAML fomatter

Kubernetes YAML Formatter - Visual Studio Marketplace

YAML - Visual Studio Marketplace by RedHat

Sunday, October 29, 2023

Kubernetes, Docker, CRI, ContainerD

K8s 1.24 has removed default "dockershim" proxy interface for Docker, 
and instead using only ContainerD, that is CRI compatible.
No harm, docker images are supported as usual, just more efficient.

Container Runtime Interface (CRI) | Kubernetes

"The CRI is a plugin interface which enables the kubelet to use a wide variety of container runtimes, without having a need to recompile the cluster components.

You need a working container runtime on each Node in your cluster, so that the kubelet can launch Pods and their containers.

The Container Runtime Interface (CRI) is the main protocol for the communication between the kubelet and Container Runtime.

The Kubernetes Container Runtime Interface (CRI) defines the main gRPC protocol for the communication between the cluster components kubelet and container runtime"

sqlite-zstd: row-level compression for SQLite

 sqlite-zstd: Transparent dictionary-based row-level compression for SQLite - An sqlite extension written in Rust to reduce the database size without losing functionality - phiresky's blog

data is a json blob from the perspective of SQLite, but it is parsed into a strictly typed structure in the Rust application code.

phiresky/sqlite-zstd: Transparent dictionary-based row-level compression for SQLite

@GitHub, Rust, LGPL

Depending on the data, this can reduce the size of the database by 80% while keeping performance mostly the same (or even improving it, since the data to be read from disk is smaller).

Note that a compression VFS such as might be suited better depending on the use case. That has very different tradeoffs and capabilities, but the end result is similar.

mlin/sqlite_zstd_vfs: SQLite3 extension for read/write storage compression with Zstandard

Never Too Rich Or Thin: Compress Sqlite 80% | Hackaday

Saturday, October 28, 2023

EV: BMW i7

The Most Tech I've Ever Seen in a Car! - YouTube

BMW i7 Electric Luxury Sedan | BMW USA

VSCode extension: HTML Preview

 HTML Preview - Visual Studio Marketplace


george-alisson/html-preview-vscode: A HTML previewer for Visual Studio Code @GitHub

HTML to Markdown Converter (online tool)

Redis JSON, with Docker

 JSON | Redis

The JSON capability of Redis Stack provides JavaScript Object Notation (JSON) support for Redis. It lets you store, update, and retrieve JSON values in a Redis database, similar to any other Redis data type. Redis JSON also works seamlessly with Search and Query to let you index and query JSON documents.

not "free", much bigger size than standard Redis

redis-stack: 337 MB compressed, linux/amd64

redis: 49 MB compressed, linux/amd64

docker run -d --name redis-stack -p 6380:6379 redis/redis-stack
docker exec -it redis-stack sh

# redis-cli

JSON.SET enterprise . '{"captain": "kirk"}'
JSON.GET enterprise
{"captain": "kirk"}
JSON.SET enterprise .designation '{"NCC-1701"}'
JSON.GET enterprise
{"captain": "kirk", "designation": "NCC-1701"}


python example

> pip install redis > python

import redis
data = {
    'dog': {
        'scientific-name' : 'Canis familiaris'
r = redis.Redis(host='localhost', port=6380, decode_responses=True)
r.json().set('doc', '$', data)
doc = r.json().get('doc', '$')
dog = r.json().get('doc', '$.dog')
scientific_name = r.json().get('doc', '$..scientific-name')
print(scientific_name) # ['Canis familiaris']

Friday, October 27, 2023

Thursday, October 26, 2023

JS ML: text-to-speech

 Transformers.js 2.7: ML for the Web, Now with Text-to-Speech — Transformers.js provides access to machine learning models directly in the browser for all sorts of tasks and v2.7 introduces audio generation (live demo.) The Web Speech API remains the natural choice for this task for now, but the ML approach will only continue to offer greater opportunities over time.

JavaScript Weekly Issue 660: October 26, 2023

Speech synthesiser @MDN

Geo JSON compression: 7z vs Zip

When storing Goo data in JSON format usually there is a lot of redundancy.
Many Geo items, i.e. those from photo EXIF have same or similar values.
So they "should" be very compress-able.
When saved in separate, small JSON files, standard ZIP is very ineffective.

2,482 Geo JSON Files
Size: 4.15 MB (4,355,916 bytes)
Size on disk: 9.69 MB (10,166,272 bytes)

(Windows) zip: 2.17 MB file
So while total storage on disk is about 5 times smaller, effective size reduction is about 2x

When using 7-zip program, the result file is AMAZINGLY small: 7z 100 KB file
That is 20 times better than Zip, and 100 times smaller than original!

Now, having many small files is not optimal to begin with, so when they are "merged" to a single
JSON file (object using file name as key), the size of such single JSON file is 3.37 MB
(Windows) Zip of this single JSON file is now very small, 113 KB

Download 7zip

The main difference is, besides higher compression by 7zip, 
that 7zip is apparently using same shared "dictionary" for segments of files,
while zip is likely compressing each separately.

Optimally the individual files should be possible to add to archive and extract one by one.
That way the archive could effectively be used as a simple "database" for compressed files. 

i.e. to add a JSON file to an archive, would do this:

7z a -t7z archive.7z newfile.json

7z e archive.7z -o [outputdir] file.json

put "&" special character before 7z command

& "C:\Program Files\7-Zip\7z.exe" a -t7z geo.7z geo\20230818_153424.jpg.json

using from a node.js program:

7-Zip precompiled binaries.

7zip - npm
a lite-version of 7zip, ≈2.4MB.
var _7z = require('7zip')['7z']
var task = spawn(_7z, ['x', 'somefile.7z', '-y'])

The Lempel–Ziv–Markov chain algorithm (LZMA) is an algorithm used to perform lossless data compression. It has been under development since either 1996 or 1998 by Igor Pavlov[1] and was first used in the 7z format of the 7-Zip archiver. This algorithm uses a dictionary compression scheme somewhat similar to the LZ77 algorithm published by Abraham Lempel and Jacob Ziv in 1977 and features a high compression ratio (generally higher than bzip2)[2][3] and a variable compression-dictionary size (up to 4 GB),[4] while still maintaining decompression speed similar to other commonly used compression algorithms

Wednesday, October 25, 2023

architecture: micro home

 This Space-Age Pod Wants to Be Your New ADU, Office, or Off-Grid Micro-Home - Dwell

E100K, fiberglass

The Ecocapsule tiny home features an extendable wind turbine that generates power, which is stored by an on-board battery. The unit can harvest rainwater, and a built-in filtration system can purify anything sourced from rivers or lakes.

Sunday, October 22, 2023

Redis + JS

How can we use Redis Queue mechanism in Node.js? | by Soni Pandey | Medium

How to Use Queues in Web Applications – Node.js and Redis Tutorial

bee-queue/bee-queue: A simple, fast, robust job/task queue for Node.js, backed by Redis.

OptimalBits/bull: Premium Queue package for handling distributed jobs and messages in NodeJS.

BullMQ - Background Jobs processing and message queue for NodeJS | BullMQ

BullMQ is a rewrite of the popular Bull library by the same authors, but with a new API and a more modern codebase written in Typescript and with a bunch of new features and performance improvements.


redis - npm

node-redis is a modern, high performance Redis client for Node.js.

redis-om - npm

Redis OM for Node.js makes it easy to model Redis data in your Node.js applications.

Redis OM .NET | Redis OM Node.js | Redis OM Python | Redis OM Spring

bullmq - npm

The fastest, most reliable, Redis-based distributed queue for Node.

bull - npm

The fastest, most reliable, Redis-based queue for Node.


Modern Redis Unleashed | Udemy
by Sundog Education by Frank Kane, Frank Kane,

Sundog Education with Frank Kane - YouTube

Course: Modern Redis Unleashed | Udemy Business

Redis Docker image

redis - Official Image | Docker Hub

Redis on Windows = run on WSL2 = Linux, or just use Docker

Install Redis on Windows | Redis

Getting Started | The Home of Redis Developers

Reactivity with vanilla JavaScript

 Patterns for Reactivity with Modern Vanilla JavaScript | Frontend Masters

“Reactivity” is how systems react to changes in data. There are many types of reactivity, but for this article, reactivity is when data changes, you do things.

Saturday, October 21, 2023

VSCode plugin: Paste Image

 Paste Image - Visual Studio Marketplace

Paste image directly from clipboard to markdown/asciidoc(or other file)!

Support Mac/Windows/Linux! And support config destination folder.

mushanshitiancai/vscode-paste-image: paste image from clipboard to markdown/asciidoc directly! @GitHub

NVIDIA CEO Jensen Huang conversation

WOW! Excellent interview, very inspiring and informative!

NVIDIA CEO Jensen Huang: The Complete History and Strategy @ Acquired podcast

NVIDIA CEO Jensen Huang - YouTube

...founder and CEO of Nvidia the company powering this whole AI explosion at the
time of recording Nvidia is worth $1.1 trillion and is the sixth most valuable
company in the entire world and right now is a crucible moment for the company
expectations are set high I mean sky high they have about the most impressive strategic
position and lead against their competitors of any company that we've ever studied...

previous related episodes

Nvidia: The Dawn of the AI Era: The Complete History and Strategy 

"...Over the past 18 months Nvidia has weathered one of the steepest stock crashes in history ($500B+ market cap wiped away peak-to-trough!). And, it has of course also experienced an even more fantastical rise — becoming the platform that’s powering the emergence of perhaps a new form of intelligence itself… and in the process becoming a trillion-dollar company.
Today we tell another chapter in the amazing Nvidia saga: the dawn of the AI era."

Thursday, October 19, 2023


ML.NET | Machine learning made for .NET

An open source and cross-platform machine learning framework

Wednesday, October 18, 2023

PartyKit: JS Messaging

a JS messaging tool, using WebSockets, leveraging CloudFlare workers infrastructure,
(to be) sold as infrastructure, per usage, not per user

 Party on PartyKit with Sunil Pai (JS Party #296) |> Changelog

PartyKit is an open source tool that simplifies creating collaborative, multiplayer applications.


PartyKit simplifies developing multiplayer applications. With PartyKit, you can focus on building multiplayer apps or adding real-time experiences to your existing projects with as little as one line of code. Meanwhile, PartyKit will handle operational complexity and real-time infrastructure scaling.

(using CloudFlare infrastructure)

By leveraging the reach of edge computing platforms and novel programming primitives, PartyKit is powerful enough to build the most complex of applications,

npm create partykit@latest 

npx partykit dev

inspired by

Figma (software) - Wikipedia
Figma is a collaborative web application for interface design, with additional offline features enabled by desktop applications for macOS and Windows. The feature set of Figma focuses on user interface and user experience design, with an emphasis on real-time collaboration,

Tuesday, October 17, 2023

Meta Quest 3 vs Apple Vision Pro

 The Vision for Mixed Reality: Now vs The Future! - YouTube

$500 vs $3500

Apple Vision Pro Impressions! - YouTube

million: like React, 70% faster

aidenybai/million: Make React Faster. Automatically. @GitHub

Million.js works with React. Million.js makes creating web apps just as easy (It's just wrapping a React component!), but with faster rendering and loading speeds. By using a fine-tuned, optimized virtual DOM, Million.js reduces the overhead of React (try it out here)

TL;DR: Imagine React components running at the speed of raw JavaScript.

podcast interview with million's creator (a high school student)

Sunday, October 15, 2023

"Typograms": typographic diagrams

interesting, maybe even useful, if having right fonts is not an issue

Typograms (typographic diagrams) is a lightweight image format (text/typogram) useful for defining simple diagrams in technical documentation.

Like markdown, typograms is heavily inspired by pre-existing conventions found in ASCII diagrams. A small set of primitives and rules to connect them is defined, which you can use to build larger diagrams.

Typograms optimizes for editability and portability (e.g. plain text is easy to maintain, change, store and transmit), at the cost of expressivity (e.g. SVG is more expressive) and ergonomics (e.g. higher level tools produce diagrams faster).

Saturday, October 14, 2023

tool: VS Code Spell Checker

works with markdown docs

Code Spell Checker - Visual Studio Marketplace
8,360,721 installs, 4.5 stars

A basic spell checker that works well with code and documents.

The goal of this spell checker is to help catch common spelling errors while keeping the number of false positives low.

Lidar chip for self-driving vehicles

Lidar on a Chip Puts Self-Driving Cars in the Fast Lane - IEEE Spectrum

AUTO ACCIDENTS ARE RESPONSIBLE for 1.3 million deaths annually, according to the World Health Organization. That’s like losing the city of Prague each year. A switch to self-driving cars and trucks with various types of electronic sensors and sophisticated computers at the helm could save countless lives.

Thursday, October 12, 2023

Runway: Generative AI for Video

Generative AI in Video and the Future of Storytelling (with Runway CEO Cristobal Valenzuela): The Complete History and Strategy @Acquired podcast

Runway is an applied AI research company shaping the
next era of art, entertainment and human creativity.

SQL: time for changes?

interesting, very opinionated, article

 Against SQL

"SQL is the only widely-used implementation of the relational model, and it is:

This isn't just a matter of some constant programmer overhead, like SQL queries taking 20% longer to write. The fact that these issues exist in our dominant model for accessing data has dramatic downstream effects for the entire industry:
Complexity is a massive drag on quality and innovation in runtime and tooling
The need for an application layer with hand-written coordination between database and client renders useless most of the best features of relational databases

The core message that I want people to take away is that there is potentially a huge amount of value to be unlocked by replacing SQL, and more generally in rethinking where and how we draw the lines between databases, query languages and programming languages."

  • Everything is an expression.
  • Variables and functions have compact syntax.
  • Few keywords - most things are stdlib functions rather than builtin syntax.
  • Have an explicit type system rather than totally disjoint syntax for scalar expressions vs table expressions.
  • ...

Wednesday, October 11, 2023

concrete castle price

What would you do if you inherited $30M in today's money?
Henry Mercer bult himself a castle and a museum, from concrete.
Fire-proof, even windows (frames) are built from concrete!

100+ years later they are still standing, employing, and amazing people.

What would the cost, or even possibility, to build such buildings today?
Below is the AI calculated pro-rated cost by Wolfram Alpha, with average inflation rate for 100 years.

About | Mercer Museum & Fonthill Castle

Fonthill Castle | Mercer Museum & Fonthill Castle

The Mercer Museum is a six-story reinforced concrete castle designed by Henry Mercer (1856-1930) and completed in 1916. Today, it is one of Bucks County’s premier cultural attractions and a Smithsonian affiliate.

Build by only 8 people, a horse, and concrete mixer, in only 3 years
for $38000 in 1915 money = $1.1 M in 2023

When planning a museum visit, it is always good to check if the ticket may be available via a "Museum Pass" available for free in the local library system. Libraries have a certain number of subscriptions for various museums, so with some planning one can get museum tickets for yourself and your family. 

Museum Pass | Burlington County Library

dynamic CSS with JavaScript

 Dynamic style - manipulating CSS with JavaScript - W3C Wiki

how to dynamically update the styling applied to your elements by manipulating your CSS at runtime using JavaScript.

How to dynamically create CSS class in JavaScript and apply? - Stack Overflow

var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '.cssClass { color: #f00; }';

document.getElementById('someElementId').className = 'cssClass';
<div id="someElementId">test text</div>
javascript - changing CSS class definition - Stack Overflow

Tuesday, October 10, 2023

Programming Languages 2023

The Top Programming Languages 2023 - IEEE Spectrum

SQL, Python, Java, JavaScript, C++, C#, C, HTML...

the list looks "stale" many years ago?

How about:

TypeScript, Mojo, Go, Dart, Kotlin, Swift, C#... with HTML, GraphQL, GRPC, WASM