Saturday, April 30, 2022
Live Reloading Go (web) Apps
5 Ways to Live Reloading Go Applications - Tech Inscribed
go get -u github.com/cosmtrek/air
air
or
docker run -it --rm -w <WORKING_DIR> -v <PROJECT_FOLDER>:<MOUNT_POINT> -p <HOST_PORT>:<CONTAINER_PORT> cosmtrek/air
or
go get github.com/codegangsta/gin
gin --appPort 5000 --port 3000
or
npm install -g nodemon
nodemon --exec go run main.go --signal SIGTERM
or
go get github.com/pilu/fresh
fresh
Friday, April 29, 2022
"Generative Art" with SVG.js
SVG.js is fast. Obviously not as fast as vanilla js, but many times faster than the competition:
See the Pen Generative Grid by Alex Trost (@a-trost) on CodePen.
Thursday, April 28, 2022
Lunr.js vs Solr vs ElasticSearch vs OpenSearch
lunr.js: "search made simple"
Lunr: A bit like Solr, but much smaller and not as bright
olivernn/lunr.js: A bit like Solr, but much smaller and not as bright @GitHub
Features- Full text search support for 14 languages
- Boost terms at query time or boost entire documents at index time
- Scope searches to specific fields
- Fuzzy term matching with wildcards or edit distance
Solr (pronounced "solar") is an open-source enterprise-search platform, written in Java. Its major features include full-text search, hit highlighting, faceted search, real-time indexing, dynamic clustering, database integration, NoSQL features[2] and rich document (e.g., Word, PDF) handling. Providing distributed search and index replication, Solr is designed for scalability and fault tolerance.[3] Solr is widely used for enterprise search and analytics use cases and has an active development community and regular releases.
Solr runs as a standalone full-text search server. It uses the Lucene Java search library at its core for full-text indexing and search, and has REST-like HTTP/XML and JSON APIs that make it usable from most popular programming languages. Solr's external configuration allows it to be tailored to many types of applications without Java coding, and it has a plugin architecture to support more advanced customization.
Lucene is widely used as a standard foundation for non-research search applications.(Java)
Lucene has been ported to other programming languages including Object Pascal, Perl, C#, C++, Python, Ruby and PHP
web performance tools
podcast & links:
Enabling performance-centric engineering orgs featuring Dan Shappir (JS Party #216) |> Changelog
- Improving The Performance Of Wix Websites (Case Study) | Smashing Magazine
- Tweet showing metrics in the wild with Wix leading the pack
- JS Party show with Paul Bakaus from Google | For a more dope web! #174
- Core Web Vitals Report
- Core Web Vitals
- Real-user monitoring (RUM)
- Facebook’s JS Optimizer - Prepack (now deprecated)
- w3c Web Performance Working Group
- Performance API | Native web API
- High Performance Browser Networking | An O’Reilly book by Ilya Grigorik (free web verision)
- Wix - A Free Website Builder
Wednesday, April 27, 2022
Tuesday, April 26, 2022
Neovim IDE; Lua language; MessagePack data
hyperextensible Vim-based text editor
- API is first-class: discoverable, versioned, documented.
- MessagePack structured communication enables extensions in any language.
- Remote plugins run as co-processes, safely and asynchronously.
- GUIs, IDEs, web browsers can --embed Neovim as an editor or script host
- Modern GUIs
- API access from any language including C/C++, C#, Clojure, D, Elixir, Go, Haskell, Java, JavaScript/Node.js, Julia, Lisp, Lua, Perl, Python, Racket, Ruby, Rust
- Embedded, scriptable terminal emulator
MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON. But it's faster and smaller. Small integers are encoded into a single byte, and typical short strings require only one extra byte in addition to the strings themselves.
Compared to BSON, MessagePack is more space-efficient. BSON is designed for fast in-memory manipulation, whereas MessagePack is designed for efficient transmission over the wire. For example, BSON requires null terminators at the end of all strings and inserts string indexes for list elements, while MessagePack doesn't. BSON represents both arrays and maps internally as documents, which are maps, where an array is a map with keys as decimal strings counting up from 0. MessagePack on the other hand represents both maps and arrays as arrays, where each map key-value pair is contiguous, making odd items keys and even items values.
Py Sunfish Chess => GoLang
"porting the sunfish chess engine to Go. Sunfish is notable for its simplicity and small size, while still being capable of playing decent chess.
full code of the engine at https://github.com/zserge/carnatus (the name comes from latin species name of Gopher rockfish).
If you are interested in small chess engines, I strongly recommend playing with sunfish. Also, sunfish was based on Micromax engine, which has a wonderful documentation by his author, definitely worth reading."
Monday, April 25, 2022
Elon Musk += Twitter - $44B
Musk gets Twitter for $44 billion, to cheers and fears of 'free speech' plan | Reuters
"Musk wants Twitter's algorithm for prioritizing tweets to be public and objects to giving too much power on the service to corporations that advertise.Automated Chessboard + Micro Max chess sw
For this project, the Micro Max chess program from H.G. Muller and ported for Arduino by Diego Cueva was preferred. It is a very smart, efficient and it is particularly small (<2kB).
Sunday, April 24, 2022
AWS Game => Skills?
Amazon's new role-playing game can help you build your AWS skills | TechRadar
"Designed by AWS Training and Certification, AWS Cloud Quest aims to help adult learners gain practical AWS experience. To beat the game, learners will need to complete quests that build cloud skills while helping the 3D world's citizens build a better city. Gameplay includes videos, quizzes and hands-on exercises based on real-world business scenarios."Saturday, April 23, 2022
NVIDIA amazing story
Nvidia: The GPU Company (1993-2006) | History and Strategy | Deep Podcast Case Studies
"He wears signature leather jackets. He can bench press more than you. He makes cars that drive themselves. He’s cheated death — both corporate and personal — too many times to count, and he runs the 8th most valuable company in the world. Nope, he’s not Elon Musk, he’s Jensen Huang — the most badass CEO in semiconductor history. Today we tell the first chapter of his and Nvidia’s incredible story. You’ll want to buckle up for this one!"
Nvidia: The Machine Learning Company (2006-2022) | History and Strategy | Deep Podcast Case Studies
"By 2012, NVIDIA was on a decade-long road to nowhere. Or so most rational observers of the company thought. CEO Jensen Huang was plowing all the cash from the company’s gaming business into building a highly speculative platform with few clear use cases and no obviously large market opportunity. And then... a miracle happened. A miracle that led not only to Nvidia becoming the 8th largest market cap company in the world, but also nearly every internet and technology innovation that’s happened in the decade since. Machines learned how to learn. And they learned it... on Nvidia."JavaScript ML
StephenGrider/MLKits: Starter projects for machine learning
with "Plinko" game visualization
Machine Learning with Javascript @Udemy
Friday, April 22, 2022
GoLang: big math lib
big package - math/big - pkg.go.dev
Package big implements arbitrary-precision arithmetic (big numbers). The following numeric types are supported:
Int signed integers Rat rational numbers Float floating-point numbers
Thursday, April 21, 2022
AWS: move DB by using Multi-AZ deployment
want to move my DB instance from a public to a private subnet within the same VPC, and make my DB instance completely private:
- Avoids the need to create a new DB instance
- Avoids using the snapshot-restore process
- Minimizes the downtime
Reboot your DB instance with failover and disable Multi-AZ deployment
Wednesday, April 20, 2022
Azure Cosmos DB Conf April 2022
a free, virtual developer event organized in collaboration with the Azure Cosmos DB community and Microsoft.
Tuesday, April 19, 2022
C/C++ => WASM
Advantage: more compact WASM code, plus access of existing libs.
When you've written a new code module in a language like C/C++, you can compile it into WebAssembly using a tool like Emscripten.
Compiling a New C/C++ Module to WebAssembly - WebAssembly | MDN
Compiling an Existing C Module to WebAssembly - WebAssembly | MDN
How to Compile C code into WebAssembly with Emscripten – The New Stack
alternative:
Bare metal WASM with C using Clang - no stdlib; no emscripten - Demo - YouTube
Monday, April 18, 2022
Calling Rust code from Node.JS
Sunday, April 17, 2022
books: Programming Rust, Command-Line Rust
Saturday, April 16, 2022
Rust on Windows with WSL2 and VS Code
Install Rust - Rust Programming Language
open WSL2 (i.e. Ubuntu) terminal
> curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh> sudo apt-get update
> sudo apt install build-essential
How To Fix Rust Error "linker 'cc' not found" On Linux - OSTechNix
Access Linux filesystems in Windows and WSL 2 - Windows Command Line
Access WSL2/Ubuntu Drive from File Explorer - Microsoft Q&A
Open File Explorer
Type \\wsl$ in the address bar
navigate to \home\ for users' account
Calling Rust code from Node.JS - Why and How | Rust Lang | JavaScript - YouTube
Friday, April 15, 2022
Javascript Byte Code
Javascript - Byte Code - YouTube
> node --print-bytecode --print-bytecode-filter=add2numbers
How to get JavaScript bytecode from Node.js and V8 in 2019 | by Drag13 | Medium
Node.js Under the Hood #8 - Understanding Bytecodes - DEV Community
How to Compile Node.js Code Using Bytenode? | HackerNoon
Saylor Academy: free college-level education
On its website, the foundation offers 317 free, college-level courses, which are selected as typical courses in high enrollment majors at traditional U.S. colleges.[3] Content is accessible without needing to register or log into the website, however an account is required to gain access to final exams, and a free certificate of completion.[1]
The foundation works with consultants to design the courses, typically university and college faculty members or subject experts The consultant develops a blueprint for the course, then researches open educational resources (OER) to supply the course with lectures, texts, and other resources. If suitable texts and documents are not found, the foundation works with faculty to compile new materials which it releases to the OER community under a Creative Commons license.[4] Each course is accompanied by an assessment.[1]
by Michael J. Saylor - Wikipedia
Business Intelligence & Analytics Solutions
Michael Saylor: Bitcoin, Inflation, and the Future of Money | Lex Fridman Podcast #276 - YouTube
#276 - Michael Saylor: Bitcoin, Inflation, and the Future of Money | Lex Fridman Podcast
Michael Saylor Keynote - YouTube
"move from fragile to agile" world:
try quickly, and then try something else if this does not work
"it does not need to be perfect, it just needs to work to advance civilization"
Michael J. Saylor Keynote - YouTube
we have much more computing power and content now than 20 years ago
we have much less attention now
Michael Saylor's MASTERCLASS in Cryptocurrency Investing and the Future of BITCOIN - YouTube
Thursday, April 14, 2022
fastify: fast node.js web server
fastify web server in 60 seconds with node.js - YouTube by Chris Hay
Fastify, Fast and low overhead web framework, for Node.js
fastify/fastify: Fast and low overhead web framework, for Node.js @GitHub
fastify/fastify-cli: Run a Fastify application with one command! @GitHub
Fastify Crash Course | Node.js Framework - YouTube
by traversy media
Code: https://github.com/bradtraversy/fasti... Website & Docs: https://www.fastify.io/ Article: Fastify vs. Express https://medium.com/@onufrienkos/expre... Latest Udemy Courses: https://traversymedia.com
Gale Udemy search traversy
REST Client - Visual Studio Marketplace
REST Client allows you to send HTTP request and view the response in Visual Studio Code directly.
blog-examples/fastify-typescript-webhook-example at master · wolfejw86/blog-examples @GitHub
Wednesday, April 13, 2022
node.js web server: Fastify vs Express
fastify web server in 60 seconds with node.js - YouTube
Is Fastify The New Express.js? | Getting Started Tutorial Fastify 2021 Node Framework - YouTube
Node.js server without a framework - Learn web development | MDN
Fastify, Fast and low overhead web framework, for Node.js
expressjs/express: Fast, unopinionated, minimalist web framework for node.
Express Vs Fastify. Why Fastify is a better Nodejs… | by Vishal Sharma | Medium
Why should I prefer Fastify to Expressjs? - DEV Community
Fastify vs Express Performance | facsiaginsa.com
- NodeJS using
express
framework withmysql2
library. - Nodejs using
fastify
framework withfastify-mysql
plugin (the plugin usemysql2
under the hood).
By average, we can calculate that fastify needs 6.27 seconds while express need 8.6 seconds. Fastify is the winner with 27.3% faster.
AdonisJS - A fully featured web framework for Node.js
Tuesday, April 12, 2022
Dart web server in Docker container
Build a TINY Dart Language Web Server with Docker Multi-Stage | DartLang Tutorial | Dart Server Side - YouTube by Chris Hey
multi-stage docker image builds and trims the docker image to a 9MB image.
12K requests / second in container, 40K stand/alone on Mac M1
100K request / second!
Monday, April 11, 2022
AWS Lambda Function URLs
general availability of Lambda Function URLs, a feature that lets developers directly configure a HTTPS endpoint and CORS headers for a Lambda function without provisioning other services.
With the new feature developers can avoid relying on the Amazon API Gateway or the Application Load Balancer to map a Lambda function to a HTTP call. Each function URL is globally unique and can be associated with a function’s alias or the function’s ARN, implicitly invoking the latest version
- Rest API (first 333 mil) = $3.5
- HTTP API (first 300 mil) = $1.0
- Lambda URL = Free
- CloudFront proxying to Lambda URL = ~ $1.0 to $1.2
IPFS (Interplanetary File System)
introduction to IPFS (Interplanetary File System) and it's relevance to Web3, NFT's and Blockchain - YouTube by Chris Hay
IPFS Powers the Distributed Web (//ipfs.io)
IPFS @GitHub (Go, JS)
IPFS Support in Brave | Brave Browser (supports IPFS)
IPFS Gateway · Cloudflare Distributed Web Gateway docs (serving IPFS)
Cloudflare goes InterPlanetary - Introducing Cloudflare’s IPFS Gateway
OpenSea, the largest NFT marketplace (using IPFS)
Pinata | Your Home for NFT Media (hosting IPFS)
Amazon / AWS CICD Pipelines
very informative interview about internal CICD in Amazon and AWS
Clare Liguori on Automating Safe and “Hands-Off” Deployments at AWS
Sunday, April 10, 2022
Go generics: sorting => ASM
Faster sorting with Go generics - Eli Bendersky's website
deep dive:
interface vs generics in Go => benchmarking, comparing generated assembly code
code: code-for-blog/2022/genericsort at master · eliben/code-for-blog @GitHub
Docker/Lambda postgress-client tools
Dockerfile/Dockerfile at master · jbergknoff/Dockerfile
FROM alpine:3.12 RUN apk --no-cache add postgresql-client ENTRYPOINT [ "psql" ]
jbergknoff/postgresql-client - Docker Image | Docker Hub
Executing Shell Commands with Node.js
New for AWS Lambda – Container Image Support | AWS News Blog
Backup a database using AWS Lambda container
jameshy/pgdump-aws-lambda: Lambda function for executing pg_dump and streaming the output to s3.
How to install psql on Mac, Ubuntu, Debian, Windows
https://formulae.brew.sh/formula/postgresql@11
brew install libpqbrew link --force libpq
if [ $maxline == "#SystemMaxUse=" ]; then apk --no-cache add postgresql-client; fi
Saturday, April 09, 2022
Friday, April 08, 2022
Thursday, April 07, 2022
Tesla Gigafactory Texas + Berlin
Tesla Gigafactory Texas Is Officially OPEN!! - YouTube
The latest Tesla Gigafactory is now open, and will be producing Tesla Model Y vehicles with the latest 3680 batteries.book: Microservices: Up and Running
podcast interview with one of the authors
Microservices: Up and Running - GOTOpia
Wednesday, April 06, 2022
Tuesday, April 05, 2022
Docker dev environments, Lisp and others
Docker images for many dev environments / prog languages;
in particular useful for Windows users
Explore Docker's Container Image Repository | Docker Hub
CodeSignal/dockerfiles: Dockerfiles for CodeSignal user code execution @GitHub
codesignal/lisp - Docker Image | Docker Hub
fib.lisp
> docker run --rm -v ${PWD}:/lisp -it codesignal/lisp:v10.0.0
# cd /lisp
# clisp
[1]> (+ 1 2)
3
[2](load 'fib.lisp)
[3](fib 8)
21
[3](quit)
# exit
Amazon => space internet?
Jeff Bezos and Amazon just hired everybody but SpaceX for Project Kuiper | Ars Technica
Amazon announced launch agreements with the following companies as it seeks to build out its constellation of 3,236 satellites:- Arianespace: 18 launches of Europe's new Ariane 6 rocket
- Blue Origin: 12 launches of the company's New Glenn rocket, with options for 15 additional launches
- United Launch Alliance: 38 launches of the company's Vulcan rocket
- final nine Atlas V rocket launches from United Launch Alliance
Monday, April 04, 2022
mini Lisp in TypeScript
This is a Lisp interpreter compatible with lisp-in-dart, lisp-in-cs and lisp-in-go.
another one:
Indy9000/lisper: Lisp Parser Interpreter written in TypeScript @GitHub
TypeScript: Live Coding a Lisp Interpreter from scratch (Part 1) - YouTube
Sunday, April 03, 2022
Language Parsing in JavaScript
Parsing in JavaScript: all the tools and libraries you can use @ strumenta
- Antlr (https://github.com/antlr/antlr4/blob/master/doc/javascript-target.md)
- PegJS (https://github.com/pegjs/pegjs)
- Nearley (https://github.com/kach/nearley)
PEG.js – Parser Generator for JavaScript
Ohm: Parsing Made Easy – Nextjournal
Implementing a Simple Compiler on 25 Lines of JavaScript · Minko Gechev's blog
Casual Parsing in JavaScript | Brandon's Website
JSON Parser with JavaScript | Tan Li Hau
Write a parser with JavaScript | Hacker News
j-s-n/WebBS: A toy language that compiles to WebAssembly
The Art of Computer Programming by Donald Knuth
Don Knuth's Home Page @ Stanford
The Art of Computer Programming (TAOCP)
At the end of 1999, these books were named among the best twelve physical-science monographs of the century by American Scientist,
Saturday, April 02, 2022
wisdom: Brian Kernighan
Wisdom from 50+ years in software featuring Brian Kernighan (The Changelog #484) |> Changelog
podcast conversation with Brian Kernighan! Brian’s been in the software game since the beginning of Unix. Yes, he was there at Bell Labs when it all began. And he is still at it today, writing books and teaching the next generation at Princeton.... about the birth of Unix, Ken Thompson’s unique skillset, why Brian thinks C has stood the test of time, his thoughts on modern languages like Go and Rust, what’s changed in 50 years of software, what makes platforms like Unix and the web so powerful, his take as a professor on the trend of programmers skipping the university track...