Sunday, February 27, 2022

Web Assembly: Wasmtime

Introduction - Wasmtime

"Wasmtime is a Bytecode Alliance project that is a standalone wasm-only optimizing runtime for WebAssembly and WASI. It runs WebAssembly code outside of the Web, and can be used both as a command-line utility or as a library embedded in a larger application.

Wasmtime strives to be a highly configurable and embeddable runtime to run on any scale of application."

Windows 11 Android apps

 A first look at Microsoft’s new Windows 11 Android apps support

Microsoft has released the first preview version of its Android apps support in Windows 11. It’s available to testers in the Beta Channel version of Windows 11, which means you’ll need to opt into the Windows Insider program to get access. 

Thursday, February 24, 2022

TypeScript compiler in GoLang

 I'm porting tsc to Go

"I’m porting the TypeScript Type Checker tsc to Go, and not Rust. As the creator of SWC, an extensible Rust platform, this might sound strange. Let me explain. ... rewriting a massive project such as tsc would be extremely difficult to continue.
  • tsc: 133.2 seconds (TypeScript)
  • Rust rewrite: 2.13 seconds (62x faster)
Vercel is sponsoring and funding the work to port tsc to Go.
planning to open-source this work in the future. 

book: Eloquent JavaScript => Lisp

Eloquent JavaScript (book online)

This is a book about JavaScript, programming, and the wonders of the digital. You can read it online here, or buy your own paperback copy (3rd edition).

Written by Marijn Haverbeke.


ULL-ESIT-PL-1617/egg: Eloquent JS. Chapter 12 Project. A Programming Language



yascriptlang - npm
Yet Another Script Language
Because everyone should have their own Lisp

coderaiser/lisp: simple lisp implementation @GitHub

Simple lisp implementation in JavaScript.

Could be used in browser as global lispnode.js environment
or bundled with help of 
browserify.

  const lisp = require('lisp');
lisp('(+ "hello" " world"');
// returns
'hello world'




Wednesday, February 23, 2022

Ruby On Rails on Ubuntu on Windows 10

Thanks to WSL2: Windows Subsystem for Linux on Windows version 2, 
whole Linux (select distributions) can run "natively" on Windows,
transparently, without "virtual machines". 

With that, all Linux (unix) tools become directly usable.
Ruby on Rails installer takes full advantage of that, 
much simplifying possible compatibility issues.

 Install Ruby On Rails on Windows 10 | GoRails


Tuesday, February 22, 2022

astexplorer.net: AST tool

AST explorer 

fkling/astexplorer: A web tool to explore the ASTs generated by various parsers. @GitHub


acornjs/acorn: A small, fast, JavaScript-based JavaScript parser

AST syntax comes from Mozilla API (leak)

tsc (TypeScript compiler) can parse and generate both JS and TS code

Using the Compiler API · microsoft/TypeScript Wiki

import * as ts from 'typescript';
const printer: ts.Printer = ts.createPrinter();
const sourceFile: ts.SourceFile = ts.createSourceFile(
  'test.ts', 'const x  :  number = 42', ts.ScriptTarget.ES2015, true, ts.ScriptKind.TS
);
console.log(printer.printFile(sourceFile))

Quick look at the TypeScript Compiler API - BLS29 SHOW & TELL WITH CHAU TRAN - YouTube

function add2 (x) { return x + 2 }

acorn =>

{
  "type": "Program",
  "start": 0,
  "end": 34,
  "body": [
    {
      "type": "FunctionDeclaration",
      "start": 0,
      "end": 34,
      "id": {
        "type": "Identifier",
        "start": 9,
        "end": 13,
        "name": "add2"
      },
      "expression": false,
      "generator": false,
      "async": false,
      "params": [
        {
          "type": "Identifier",
          "start": 15,
          "end": 16,
          "name": "x"
        }
      ],
      "body": {
        "type": "BlockStatement",
        "start": 18,
        "end": 34,
        "body": [
          {
            "type": "ReturnStatement",
            "start": 20,
            "end": 32,
            "argument": {
              "type": "BinaryExpression",
              "start": 27,
              "end": 32,
              "left": {
                "type": "Identifier",
                "start": 27,
                "end": 28,
                "name": "x"
              },
              "operator": "+",
              "right": {
                "type": "Literal",
                "start": 31,
                "end": 32,
                "value": 2,
                "raw": "2"
              }
            }
          }
        ]
      }
    }
  ],
  "sourceType": "module"
}


function add2 (x: number): number { return x + 2 }

tsc => 

{
  "pos": 0,
  "end": 50,
  "flags": 0,
  "modifierFlagsCache": 0,
  "transformFlags": 33,
  "kind": 294,
  "statements": [
    {
      "pos": 0,
      "end": 50,
      "flags": 0,
      "modifierFlagsCache": 0,
      "transformFlags": 1048609,
      "parent": "[Circular ~]",
      "kind": 248,
      "name": {
        "pos": 8,
        "end": 13,
        "flags": 0,
        "modifierFlagsCache": 0,
        "transformFlags": 0,
        "parent": "[Circular ~.statements.0]",
        "kind": 78,
        "escapedText": "add2"
      },
      "parameters": [
        {
          "pos": 15,
          "end": 24,
          "flags": 0,
          "modifierFlagsCache": 0,
          "transformFlags": 1,
          "parent": "[Circular ~.statements.0]",
          "kind": 159,
          "name": {
            "pos": 15,
            "end": 16,
            "flags": 0,
            "modifierFlagsCache": 0,
            "transformFlags": 0,
            "parent": "[Circular ~.statements.0.parameters.0]",
            "kind": 78,
            "escapedText": "x"
          },
          "type": {
            "pos": 17,
            "end": 24,
            "flags": 0,
            "modifierFlagsCache": 0,
            "transformFlags": 1,
            "parent": "[Circular ~.statements.0.parameters.0]",
            "kind": 143
          }
        }
      ],
      "type": {
        "pos": 26,
        "end": 33,
        "flags": 0,
        "modifierFlagsCache": 0,
        "transformFlags": 1,
        "parent": "[Circular ~.statements.0]",
        "kind": 143
      },
      "body": {
        "pos": 33,
        "end": 50,
        "flags": 0,
        "modifierFlagsCache": 0,
        "transformFlags": 1048608,
        "parent": "[Circular ~.statements.0]",
        "kind": 227,
        "statements": [
          {
            "pos": 35,
            "end": 48,
            "flags": 0,
            "modifierFlagsCache": 0,
            "transformFlags": 1048608,
            "parent": "[Circular ~.statements.0.body]",
            "kind": 239,
            "expression": {
              "pos": 42,
              "end": 48,
              "flags": 0,
              "modifierFlagsCache": 0,
              "transformFlags": 0,
              "parent": "[Circular ~.statements.0.body.statements.0]",
              "kind": 213,
              "left": {
                "pos": 42,
                "end": 44,
                "flags": 0,
                "modifierFlagsCache": 0,
                "transformFlags": 0,
                "parent": "[Circular ~.statements.0.body.statements.0.expression]",
                "kind": 78,
                "escapedText": "x"
              },
              "operatorToken": {
                "pos": 44,
                "end": 46,
                "flags": 0,
                "modifierFlagsCache": 0,
                "transformFlags": 0,
                "parent": "[Circular ~.statements.0.body.statements.0.expression]",
                "kind": 39
              },
              "right": {
                "pos": 46,
                "end": 48,
                "flags": 0,
                "modifierFlagsCache": 0,
                "transformFlags": 0,
                "parent": "[Circular ~.statements.0.body.statements.0.expression]",
                "kind": 8,
                "text": "2",
                "numericLiteralFlags": 0
              }
            }
          }
        ],
        "multiLine": false
      }
    }
  ],
  "endOfFileToken": {
    "pos": 50,
    "end": 50,
    "flags": 0,
    "modifierFlagsCache": 0,
    "transformFlags": 0,
    "parent": "[Circular ~]",
    "kind": 1
  },
  "fileName": "astExplorer.tsx",
  "text": "function add2 (x: number): number { return x + 2 }",
  "languageVersion": 99,
  "languageVariant": 1,
  "scriptKind": 4,
  "isDeclarationFile": false,
  "hasNoDefaultLib": false,
  "bindDiagnostics": [],
  "pragmas": {},
  "referencedFiles": [],
  "typeReferenceDirectives": [],
  "libReferenceDirectives": [],
  "amdDependencies": [],
  "nodeCount": 15,
  "identifierCount": 4,
  "identifiers": {},
  "parseDiagnostics": [],
  "path": "astExplorer.tsx",
  "resolvedPath": "astExplorer.tsx",
  "originalFileName": "astExplorer.tsx",
  "imports": [],
  "moduleAugmentations": [],
  "ambientModuleNames": []
}

Programming Languages Benchmarks @Vercel

 Benchmarks for programming languages and compilers, Which programming language or compiler is faster @Vercel

This site provides side by side comparison of several (many!) programming languages and their different compilers or runtime

hanabi1224/Programming-Language-Benchmarks: Yet another implementation of computer language benchmarks game @GitHub

 automated process for benchmark generation and publishing.

Programming-Language-Benchmarks/bench/algorithm/http-server at main · hanabi1224/Programming-Language-Benchmarks

Dart VS Go benchmarks, Which programming language or compiler is faster


Which programming language is fastest? | Computer Language Benchmarks Game


simple | Computer Language Benchmarks Game

Monday, February 21, 2022

Yellicode: Code Generation with TypeScript

Yellicode @GitHub

yellicode/cli: CLI for Yellicode - an extensible code generator.

Yellicode lets you build your own code generation templates with TypeScript. It consists of a Node.js CLI and extensible APIs, making it easy for developers to create, share and re-use code generators for their favorite programming languages and frameworks.  MPL license


Yellicode - A free and extensible source code generation engine







server side Dart, with gRPC


Writing server side Dart code. …and: is it worth it? | by Matias Meno | Dropzone

Server side dart code is very similar to node. The simplest code to actually start an HTTP server in dart is this:

import 'dart:io';
main() async {
  final server = await HttpServer.bind(InternetAddress.anyIPv6, 80);
  server.listen((HttpRequest request) {
    request.response.write('Hello, world!');
    request.response.close();
  });
}

you compile your whole server app into a single binary, which is optimized and starts instantly, and ship it in a tiny Container.


Sunday, February 20, 2022

chips: no Nvidia + ARM, Intel to make RISC-V

Nvidia calls off its efforts to acquire Arm | TechCrunch


RISC-V is Ready for Great Challenges - SiFive

SiFive  announced a collaboration with Intel using the SiFive Performance P550 processor to build a RISC-V development platform,


Episode 358: Why Resideo's First Alert buy makes sense - IoT Podcast - Internet of Things


k8s => w9y (Web Assembly)

webassembly: the new kubernetes? -- wingolog

k8s <=? w9y

Server-side WebAssembly is in a similar space as Kubernetes -- or rather, WebAssembly is similar to processes plus private namespaces. WebAssembly gives you a good abstraction barrier and (can give) high security isolation.


Friday, February 18, 2022

Thursday, February 17, 2022

web3 blockchain tool: Solana

 Solana (blockchain platform) - Wikipedia

Solana is a public blockchain platform with smart contract functionality. Its native cryptocurrency is SOL.

 "a potential long-term rival for Ethereum", citing superior transaction speeds and lower associated costs.

Solana achieves consensus using a proof-of-stake mechanism, as well as a "proof-of-history" mechanism which Solana's whitepaper claims improves scalability without sacrificing decentralization and security.[8]

Solana can handle 710,000 transactions per second, which is faster than the Ethereum blockchain


Written in Rust







Go & SQLite

 GopherCon 2021: Ben Johnson - Building Production Applications Using Go & SQLite - YouTube


benbjohnson (Ben Johnson) @GitHub


benbjohnson/go-sqlite3: sqlite3 driver for go using database/sql


benbjohnson/litestream: Streaming replication for SQLite.

Litestream is a standalone streaming replication tool for SQLite. It runs as a background process and safely replicates changes incrementally to another file or S3. Litestream only communicates with SQLite through the SQLite API so it will not corrupt your database.



Tuesday, February 15, 2022

Akamai += Linode - $900M

 Akamai acquires Linode for $900M | TechCrunch

ELIZA bot, 50+ years later, @GitHub

ELIZA - Wikipedia

ELIZA is an early natural language processing computer program created from 1964 to 1966[1] at the MIT Artificial Intelligence Laboratory by Joseph Weizenbaum.[2] Created to demonstrate the superficiality of communication between humans and machines, Eliza simulated conversation by using a "pattern matching" and substitution methodology that gave users an illusion of understanding on the part of the program, but had no built in framework for contextualizing events.[3][4][5] Directives on how to interact were provided by "scripts"

How To Develop A Chat Bot With Node.js — Smashing Magazine

Original paper

weizenbaum.eliza.1966.pdf

Origin of name "Eliza":

"Like the Eliza of Pygmalion fame, it can be made to appear even more civilized, the relation of appearance to reality"

Eliza Doolittle - Wikipedia

Python

wadetb/eliza: Python implementation of the Eliza chatbot

jezhiggins/eliza.py: A cheesy little Eliza knock-off

graylu21/ELIZA-ChatterBot: A Python ELIZA + ChatterBot hybrid!

GoLang

tsawler/eliza

mattshiel/eliza-go: An implementation of the classic Eliza program in Golang

F#

evelinag/eliza-slack

JavaScript

keithweaver/eliza: ELIZA is an early natural language processing computer program created from 1964

urbanautomaton/eliza-js

TypeScript

chigix/eliza-instrumentality: Eliza Instrumentality Project

Java

chayden Eliza test (Java)

codeanticode/eliza: The classic Eliza psychologist program, implemented as a Processing library.

Rust

arosspope/eliza-rs: A rust implementation of ELIZA - a natural language processing program developed by Joseph Weizenbaum in 1966.

Smalltalk

brackendev/ELIZA-Smalltalk: A Smalltalk implementation of ELIZA, an early natural language processing computer program



Monday, February 14, 2022

EV: Rivian

Sandy and Rivian CEO RJ Scaringe - YouTube


2022 Rivian R1T Review // The Cybertruck That Actually Exists - YouTube


I Drove the Cybertruck Killer - Rivian R1T First Look Review - YouTube


ML HW: eFPGA SparkFun

 SparkFun QuickLogic Thing Plus - EOS S3 - DEV-17273 - SparkFun Electronics

$46

The SparkFun QuickLogic Thing Plus EOS™ S3, is a small form factor system ideal for enabling the next generation of low-power Machine Learning (ML) devices. The QuickLogic Thing Plus is powered by QuickLogic’s EOS S3, the first eFPGA-enabled Arm Cortex©-M4F MCU to be fully supported with Zephyr RTOS and FreeRTOS. 


Friday, February 11, 2022

Mango Pi: RISC-V based "Raspberry Pi"-like board

 RISC-V Powered Mango Pi Takes on Raspberry Pi Zero at Its Own Game | Tom's Hardware

A new, small, single board computer from Mango Pi uses the Allwinner D1 RISC-V chip. Created in China, not available for sale yet.


or just get the original... will not be much different price anyway, since most of the cost of not the CPU but the rest of the board... and there are many choices now... 











Wednesday, February 09, 2022

Tesla for crypto mining

 Tesla owner mines bitcoin, ethereum with his car

mint crypto coins like ethereum is to use JavaScript to hack into his Tesla’s native CPU... "It’s much faster, and it’s much more energy efficient,” explained Raval, who says that when the price of ether and polygon peaked in 2021, he was netting as much as $800 a month mining for both.

Sunday, February 06, 2022

SolidJS: Reactive Javascript Library => Preact.js (?)

one more JS tool... so "vanila.js" is still the fastest :)

SolidJS · Reactive Javascript Library
Simple and performant reactivity for building user interfaces.

Vanilla
1
Solid 1.0.0
1.05
Inferno 7.4.8
1.2
Svelte 3.37.9
1.27
Preact 10.5.12
1.42
Vue 3.0.6
1.54
React 17.0.1
1.93
Angular 12.0.1
1.93
Ember 3.22.0
2.21




NPM downloads: 
solid-js - npm (16K/week)
svelte - npm (275K/week)
angular - npm (500K/week)
vue - npm (2.7M/week)
preact - npm (1M/week)
react - npm (15M/week)

so just based on "numbers", and compatibility with most popular React,
"preact" has best combination at this point...


Etsy, recently announced the completion of Etsy’s migration from React v15.6 to Preact 10. Going beyond the difference in library size, Sangster argued that adopting Preact lowered the risk associated with migrating Etsy’s large codebase. As Preact was already used by Etsy’s front-end team, migrating to Preact for seller-facing pages would avoid maintaining a fragmented stack.