Friday, December 31, 2021

"amazon.com" of web3?

Here is an interesting podcast / blog post about "what would Bezos do today," 
drawing parallels of internet / "web 1.0" (in fact it was HTTP 0.9 of 1990's :)
to what is now, not quite correctly, called "web3".

Crypto Bezos - Not Boring by Packy McCormick

  • The late-90s internet, and the public’s attitude towards it, was strikingly similar to web3, and the public’s attitude towards it, today.
  • Amazon was the only FAAMG company that was conceived of explicitly as a business to take advantage of the internet’s unique characteristics.


What they said in 1999 about Amazon dot com - YouTube


And here is a book and podcast interview about HOW actual amazon.com DID do what they did to become very successful, customer-obsessed company. 

Working Backwards: Insights, Stories, and Secrets from Inside Amazon: Bryar, Colin, Carr, Bill: 9781250267597: Amazon.com: Books


Amazon Narratives: Memos and working Backwards From Release | Future @ a16z

"authors Colin Bryar and Bill Carr share not only how Amazon did it, but how other companies can do it, too, drawing on their combined 27 years of firsthand observations and experiences from being in “the room” where it happens. Bill was vice president of digital media, founded and led Amazon Music, Amazon Video, Amazon Studios; and Colin started out in the software group, was a technical vice president, and then, notably, was one of Jeff Bezos’ earliest shadows — the shadow before him was in fact Andy Jassy, president and CEO of Amazon Web Services & Amazon.


Summary of Working Backwards by Colin Bryar and Bill Carr | Summaries.Com

  1. Have solid leadership principles.
  2. Use hiring to progressively raise the bar.
  3. Organize so you have single-threaded leaders.
  4. Communicate using narratives and six-pagers.
  5. Start with the desired customer experience.
  6. Manage your business inputs, not outputs.


Business Book Main Idea Snapshot Index | Summaries.Com

GoLang web scraping tool: Ferret

github.com/MontFerret/ferret

ferret is a web scraping system. It aims to simplify data extraction from the web for UI testing, machine learning, analytics and more.
ferret allows users to focus on the data. It abstracts away the technical details and complexity of underlying technologies using its own declarative language. It is extremely portable, extensible, and fast.

Read the introductory blog post about Ferret here!




Thursday, December 30, 2021

HW: Risc-V RV64 => phones

First RISC-V smartphones could launch in 2022

Developments for the RISC-V ISA seem to be advancing at an ever increasing rate by the year, as SiFIve is now striding to transform the architecture into a high-quality alternative to x86 and ARM. This year, SiFive launched its first PC-oriented RISC-V platform and, with the Linux support approaching full stability on many RISC-V chipsets like the latest RV64 packages from Alpine and other single board producers, we now see plans to push RISC-V adoption on Android-based smartphones.





JavaScript <-> Python

4 tools to convert Python to JavaScript (and back again)


A newly minted Python-to-JS transpiler, Transcrypt makes intriguing promises about the quality of the code it generates.


Jiphy — meaning “JavaScript in, Python out” — converts in both directions. Plus, code from both languages can be intermixed before being converted to either target language.


Brython implements a version of Python 3 for client-side Web programming via a JavaScript library that emulates all the keywords and most of the built-ins for Python 3. Scripts written in Python can be included directly in a Web page, and Brython supplies a high-level Python module interface (browser) for performing the work with the DOM and the browser normally done directly in JavaScript.


RapydScript promises “Pythonic JavaScript that doesn’t suck.” The project is conceptually similar to CoffeeScript: Take in code written in a flavor of Python, generate JavaScript, and leverage the best of both words. In Python’s case, it’s the cleanliness of syntax; in JavaScript’s case, it’s anonymous functions, manipulation of the DOM, and being able to use existing JavaScript libraries like jQuery or the Node.js core.

Wednesday, December 29, 2021

Elon Musk interview; creator of Bitcoin?

Elon Musk: SpaceX, Mars, Tesla Autopilot, Self-Driving, Robotics, and AI | Lex Fridman Podcast #252 - YouTube

#252 - Elon Musk: SpaceX, Mars, Tesla Autopilot, Self-Driving, Robotics, and AI | Lex Fridman Podcast

Elon Musk's Epic Interview With Lex Fridman | Torque News

Elon Musk stated that Tesla is building and running their own C compiler to improve speed and efficiency. 

React Remix

Introduction to Remix by Flavio

What’s Remix? It’s a new React-based framework which just reached version 1.0, and was released publicly with MIT license, the license we all love.

Note: it was sponsorware, now it’s public and free

Do you know Next.js? Or SvelteKit? Well, Remix is something like that, but with some unique features that make it an interesting alternative. But it has no static site support, so it always needs a server. Which makes it good for some use cases, bad for others.

Good for use cases where you have a database, dynamic data, user accounts with private data, and so on. Like with a Rails, Django or Laravel app.

Or in the JS world, it’s more an alternative to RedwoodJS or Blitz.js, aka it’s more about building apps rather than sites.


Tuesday, December 28, 2021

Monday, December 27, 2021

a16z


Excellent, very informative stories about VC firm Andreessen Horowitz (a16z)

Andreessen Horowitz Part II | History and Strategy | Deep Podcast Case Studies

Andreessen Horowitz Part I | History and Strategy | Deep Podcast Case Studies

Marc Andreessen co-created web revolution by co-creating first AND second popular web browsers (Mosaic & Netscape), and started "dot com" boom with Netscape IPO.

In his "second coming" he co-created venture investing company that changed the way early investing is done and helped create many very successful companies and a lot of value for investors.
A16Z also helped success of "social networks" and Bitcoin and related blockchains.

Not everyone would agree with their investments and methods, 
but their success and influence could not be denied. 






code tool: AST Explorer

astexplorer.net

Paste or drop code into the editor and inspect the generated AST 

JavaScript, GraphQL, Graphviz, ...

github.com/fkling/astexplorer


awesomeopensource.com/project/Kronuz/esprima-python

ECMAScript parsing infrastructure for multipurpose analysis


jarble.github.io/transpiler/

https://stackoverflow.com/questions/2346584/conversion-from-javascript-to-python-code

https://github.com/PiotrDabkowski/Js2Py


github.com/facebook/jscodeshift

a toolkit for running codemods over multiple JavaScript or TypeScript files. 

[JavaScript] Master the Art of the AST and Take Control of Your JS @youtube


ASTs for Beginners at Clevertech by Kent Dodds @YouTube



JointJS: JAVASCRIPT AST VISUALIZER

jointjs.com/demos/javascript-ast

Sunday, December 26, 2021

AI-assisted code tool "Tabnine" vs "Github Copilot"

AI-assisted development is here to stay with Eran Yahav, CTO of Tabnine (The Changelog #472) |> Changelog


Tabnine

Program synthesis @Wikipedia









graphire: react graph visualization library

 flavioschneider/graphire: An unopinionated react graph visualization library.

clever usage of .jsx

Use Node and Link components (defined in step 2 and 3) inside an svg by using the Graph wrapper.

import { Graph } from 'graphire'
const MyComponent = (
  return (
    <svg>
      <Graph>
        <Node uid={0} x={110} y={300} color='red'/>
        <Node uid={1} x={50} y={30} color='orange' />
        <Node uid={2} x={150} y={80} color='green' />
        <Node uid='k' x={200} y={200} color='blue' />
        <Node uid={3} x={400} y={100} color='yellow' />

        <Link source={0} target={1} />
        <Link source={1} target={2} />
        <Link source={1} target='k' />
        <Link source={3} target='k' />
      </Graph>
    </svg>
  )
)



Saturday, December 25, 2021

FlatBuffers

logo

FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serialized data without parsing/unpacking it first, while still having great forwards/backwards compatibility.

FlatBuffers: FlatBuffers

FlatBuffers is an efficient cross platform serialization library for C++, C#, C, Go, Java, Kotlin, JavaScript, Lobster, Lua, TypeScript, PHP, Python, Rust and Swift. It was originally created at Google for game development and other performance-critical applications.

It is available as Open Source on GitHub under the Apache license, v2 (see LICENSE.txt).

Protocol Buffers is indeed relatively similar to FlatBuffers, with the primary difference being that FlatBuffers does not need a parsing/ unpacking step to a secondary representation before you can access data, often coupled with per-object memory allocation. The code is an order of magnitude bigger, too. Protocol Buffers has no optional text import/export.
But all the cool kids use JSON!

JSON is very readable (which is why we use it as our optional text format) and very convenient when used together with dynamically typed languages (such as JavaScript). When serializing data from statically typed languages, however, JSON not only has the obvious drawback of runtime inefficiency, but also forces you to write more code to access data (counterintuitively) due to its dynamic-typing serialization system. In this context, it is only a better choice for systems that have very little to no information ahead of time about what data needs to be stored.

If you do need to store data that doesn't fit a schema, FlatBuffers also offers a schema-less (self-describing) version!

Read more about the "why" of FlatBuffers in the white paper.


chubbymaggie/fast: Flat Abstract Syntax Tree
This project adopts flatbuffers, a one-dimensional array to represent the ASTs as a binary file, and demonstates the improved efficiency and applicability to software development.

Thursday, December 23, 2021

Lisp, Scheme => Web Assembly

Lisp logo.svg

List is the second oldest programming language created in 1958 John McCarthy on MIT. Yet, is it surprisingly advanced and modern, due to its mathematical foundation and clean implementation. 

By why bother looking at this now, not just for "theory?" Among other reasons, Web Assembly, arguably a foundation of next wave of computing platform after containers, is using same S-expression syntax and semantics from Lisp!


Even JavaScript, the most commonly used language now, is inspired by Lisp.
Brendan Eich ... originally intending to put Scheme "in the browser",[4] but his Netscape superiors insisted that the language's syntax resemble that of Java. As a result, Eich devised a language that had much of the functionality of Scheme, the object-orientation of Self, and the syntax of Java. 


Common Lisp (lisp-lang.org)


Online playground

Online Lisp Compiler - Online Lisp Editor - Online Lisp IDE - Lisp Coding Online - Practice Lisp Online - Execute Lisp Online - Compile Lisp Online - Run Lisp Online @ tutorialspoint

tutorials

LISP Tutorial @tutorialspoint


Lisp (programming language) - Wikipedia

The name LISP derives from "LISt Processor".[10] Linked lists are one of Lisp's major data structures, and Lisp source code is made of lists. Thus, Lisp programs can manipulate source code as a data structure, giving rise to the macro systems that allow programmers to create new syntax or new domain-specific languages embedded in Lisp.

The interchangeability of code and data gives Lisp its instantly recognizable syntax. All program code is written as s-expressions, or parenthesized lists. A function call or syntactic form is written as a list with the function or operator's name first, and the arguments following; for instance, a function f that takes three arguments would be called as (f arg1 arg2 arg3).

Scheme (programming language) - Wikipedia

Scheme is a minimalist dialect of the Lisp family of programming languages. Scheme consists of a small standard core with several tools for language extension.[1]

Scheme was created during the 1970s at the MIT AI Lab and released by its developers, Guy L. Steele and Gerald Jay Sussman, via a series of memos now known as the Lambda Papers. It was the first dialect of Lisp to choose lexical scope and the first to require implementations to perform tail-call optimization, giving stronger support for functional programming and associated techniques such as recursive algorithms. It was also one of the first programming languages to support first-class continuations. It had a significant influence on the effort that led to the development of Common Lisp.[2]



(free online) books

ANSI Common Lisp by Paul Graham

On Lisp

Common Lisp Books | Common Lisp


Welcome to the SICP Web Site

Structure and Interpretation of Computer Programs, by Abelson, Sussman, and Sussman.

tools

SLip - a Lisp system in JavaScript, for browsers

examples of List code

Category:Common Lisp - Rosetta Code

(defun factorial (n)
(if (< n 2) 1 (* n (factorial (1- n)))))


WebAssembly - Wikipedia

WebAssembly (sometimes abbreviated Wasm) is an open standard that defines a portable binary-code format for executable programs, and a corresponding text format, as well as interfaces for facilitating interactions between such programs and their host environment.[2][3][4][5] The main goal of WebAssembly is to enable high-performance applications on web pages, but the format is designed to be executed and integrated in other environments as well, including standalone ones.[6][7][8]

In 2021, it received the Programming Languages Software Award from ACM SIGPLAN.[9]

WebAssembly | MDN

WebAssembly is a new type of code that can be run in modern web browsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages such as C/C++, C# and Rust with a compilation target so that they can run on the web. It is also designed to run alongside JavaScript, allowing both to work together.

Understanding WebAssembly text format - WebAssembly | MDN

Factorial - Rosetta Code

(module
 ;; recursive, refactored to use s-expressions and named variables
(func $fact_f64 (export "fact_f64") (param $n f64) (result f64)
(if (result f64) (f64.lt (get_local $n) (f64.const 1))
(then f64.const 1)
(else
(f64.mul
(get_local $n)
(call $fact_f64 (f64.sub (get_local $n) (f64.const 1)))
)
)
)
)
)
 

Replit: in-browser IDE

The collaborative browser based IDE - Replit

free, collaborative, in-browser IDE to code in 50+ languages — without spending a second on setup.


Replit (rep·lit), formerly Repl.it, is a San Francisco-based start-up and an online IDE (integrated development environment).[4] Its name comes from the acronym REPL, which stands for "read–evaluate–print loop".






Wednesday, December 22, 2021

Seasons Calendar 2022

A new, quite unique, continuous design, directly generated, highly customizable printable PDF. 

With National Parks photos, US Holidays, weeks starting on Sunday:

2022 seasons calendar, English, US holidays, NPs, Letter size

2022 montly calendar, English, US holidays, NPs, Letter size

2022 seasons calendar, English, US holidays, NPs, Tabloid size

Without holidays: 

2022 seasons calendar, English, NPs, Letter size

2022 seasons calendar, English, NPs, A4 size

2022 seasons calendar, English, NPs, A3 size

Weeks starting on Monday:

2022 seasons calendar, English, NPs, A4 size

2022 monthly calendar, English, NPs, A4 size

Serbian Language








"cloud status"

again :(

complex systems need to. be designed ("architected") for resiliency...

also may help to consider more "anti-fragile" solutions, like Web3 ?


AWS live status. Problems and outages for Amazon Web Services | Downdetector



AWS Service Health Dashboard

"4:35 AM PST We are investigating increased EC2 launch failures and networking connectivity issues for some instances in a single Availability Zone (USE1-AZ4) in the US-EAST-1 Region. Other Availability Zones within the US-EAST-1 Region are not affected by this issue.
5:01 AM PST We can confirm a loss of power within a single data center within a single Availability Zone (USE1-AZ4) in the US-EAST-1 Region. This is affecting availability and connectivity to EC2 instances that are part of the affected data center within the affected Availability Zone."



Azure status


Google Cloud Status Dashboard



"Issues with upstream provider"

Tuesday, December 21, 2021

TypeScript Compiler API; AST Viewer

 Static Analysis and Source Code Manipulation in TypeScript - YouTube

TypeScript Compiler API: from string to AST - Stack Overflow

import * as ts from "typescript";

const sourceFile = ts.createSourceFile(
    "file.ts",                  // filePath
    "function myFunction() {}", // fileText
    ts.ScriptTarget.Latest,     // scriptTarget
    true                        // setParentNodes -- sets the `parent` property
);
dsherret (David Sherret) @GitHub
dsherret/ts-ast-viewer: TypeScript AST viewer. @GitHub

TypeScript AST Viewer (demo)
dsherret/ts-morph: TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Using the Compiler API · microsoft/TypeScript Wiki
Compiler API (TypeScript) | learning-notes
TypeScript: Developers - TypeScript VFS




JavaScript & TypeScript AST Tools

 Read JavaScript Source Code, Using an AST | DigitalOcean

An AST is the result of parsing code. For JavaScript, an AST is a JavaScript object containing a tree representation of your source. Before we use it, we have to create it. Depending on the code we are parsing, we choose the appropriate parser.

Tree graph from @babel/parser

 some of the most well known Open Source ECMAScript parsers:

ParserSupported LanguagesGithub
acornesnext & JSX (using acorn-jsx)https://github.com/acornjs/acorn
esprimaesnext & olderhttps://github.com/jquery/esprima
cherowesnext & olderhttps://github.com/cherow/cherow
espreeesnext & olderhttps://github.com/eslint/espree
shiftesnext & olderhttps://github.com/shapesecurity/shift-parser-js
babelesnext, JSX & typescripthttps://github.com/babel/babel
TypeScriptesnext & typescripthttps://github.com/Microsoft/TypeScript
Using the Compiler API · microsoft/TypeScript Wiki


Once upon a time, an unsuspecting Mozilla engineer created an API in Firefox that exposed the SpiderMonkey engine's JavaScript parser as a JavaScript API. Said engineer documented the format it produced, and this format caught on as a lingua franca for tools that manipulate JavaScript source code.

Meanwhile JavaScript is evolving. This site will serve as a community standard for people involved in building and using these tools to help evolve this format to keep up with the evolution of the JavaScript language.

estree/es2015.md at master · estree/estree

This document specifies the extensions to the core ESTree AST types to support the ES2015 grammar.