Fertility Rate

A sustainable population requires a fertility rate of around two or slightly more, on average, as suggested by mathematics. A lower fertility rate implies that children are seen as less useful. When subscribing to a product, its utility normally increases over time, accelerating its value and potentially reducing its cost. This principle can be similarly applied to children, but with a negative cost implication. The negative price means, if you do not sell it, nothing would be bought from you and if you sell, it will be definitely bought. The less children are ‘utilized’ in a society, the more expensive they become in the subsequent cycle, until they are perceived as a problem rather than a solution, making the prospect of having children less attractive to families. ...

December 29, 2023 · evgnomon

Technology Singularity and The State

Technology is more useful being used! so a singularity. No need to put numbers from the past showing the exponential growth. So the relation is the other way around as the devided big tech accelerates the technology singularity. the time will arrive. State controls the devided big tech and collects tax. State is a big tech itself, an artificial singularity. The state can not control the singularity since they are kind of singularity, artificial. But they can accelerate the real singularity, The state is a collection of finite people. It is always possible to have another one added to the mix for a big turn! And natural singularity is not something from inside, it is an outsider. ...

December 22, 2023 · evgnomon

Digital Factory

A quintessential example of high-tech technology, traditionally requiring substantial organizational resources, is automotive research and development (R&D) and manufacturing. In this realm, car manufacturing is executed by specialized robotic arms. However, these same assembly lines can be adapted to produce various products under a strict rule: “No human presence is allowed inside the factory.” This restriction ensures that only robots, programmed remotely, enter the facility for maintenance or part replacements. ...

December 10, 2023 · evgnomon

BTC and Money

BTC and Money Gold is not money if USD is not, and USD is not money if BTC is not. Arguments against BTC are arguments against money, against civilization itself. In a sound and complete system, use is develop and develop is use. I should invest in what I use, and I should use what I have invested in. It is not reasonable to work for something and not use it. Therefore, I must have a check that what I develop is what I use, otherwise I should stop its development and/or its use. ...

evgnomon

Class

Class A class bundles state and the operations on it. The same minimal Point type across languages: Zig const std = @import("std"); const Point = struct { x: f64, y: f64, pub fn init(x: f64, y: f64) Point { return .{ .x = x, .y = y }; } pub fn distanceTo(self: Point, other: Point) f64 { return std.math.hypot(self.x - other.x, self.y - other.y); } }; pub fn main() !void { const p = Point.init(1.0, 2.0); const d = p.distanceTo(Point.init(4.0, 6.0)); try std.io.getStdOut().writer().print("{d}\n", .{d}); } Go package main import ( "fmt" "math" ) type Point struct { X, Y float64 } func NewPoint(x, y float64) Point { return Point{X: x, Y: y} } func (p Point) DistanceTo(other Point) float64 { return math.Hypot(p.X-other.X, p.Y-other.Y) } func main() { p := NewPoint(1, 2) fmt.Println(p.DistanceTo(NewPoint(4, 6))) } Python import math from dataclasses import dataclass @dataclass class Point: x: float y: float def distance_to(self, other: "Point") -> float: return math.hypot(self.x - other.x, self.y - other.y) p = Point(1.0, 2.0) print(p.distance_to(Point(4.0, 6.0))) Rust struct Point { x: f64, y: f64, } impl Point { fn new(x: f64, y: f64) -> Self { Self { x, y } } fn distance_to(&self, other: &Point) -> f64 { ((self.x - other.x).powi(2) + (self.y - other.y).powi(2)).sqrt() } } fn main() { let p = Point::new(1.0, 2.0); println!("{}", p.distance_to(&Point::new(4.0, 6.0))); } C #include <math.h> #include <stdio.h> typedef struct { double x; double y; } Point; static Point point_new(double x, double y) { return (Point){.x = x, .y = y}; } static double point_distance_to(Point a, Point b) { return hypot(a.x - b.x, a.y - b.y); } int main(void) { Point p = point_new(1.0, 2.0); printf("%f\n", point_distance_to(p, point_new(4.0, 6.0))); } C++ #include <cmath> #include <iostream> class Point { public: Point(double x, double y) : x_(x), y_(y) {} double distance_to(const Point& other) const { return std::hypot(x_ - other.x_, y_ - other.y_); } private: double x_; double y_; }; int main() { Point p(1.0, 2.0); std::cout << p.distance_to(Point(4.0, 6.0)) << '\n'; } C# using System; public sealed class Point { public double X { get; } public double Y { get; } public Point(double x, double y) { X = x; Y = y; } public double DistanceTo(Point other) => Math.Sqrt(Math.Pow(X - other.X, 2) + Math.Pow(Y - other.Y, 2)); } var p = new Point(1, 2); Console.WriteLine(p.DistanceTo(new Point(4, 6))); TypeScript class Point { constructor( public readonly x: number, public readonly y: number, ) {} distanceTo(other: Point): number { return Math.hypot(this.x - other.x, this.y - other.y); } } const p = new Point(1, 2); console.log(p.distanceTo(new Point(4, 6))); JavaScript class Point { constructor(x, y) { this.x = x; this.y = y; } distanceTo(other) { const dx = this.x - other.x; const dy = this.y - other.y; return Math.hypot(dx, dy); } } const p = new Point(1, 2); console.log(p.distanceTo(new Point(4, 6))); Kotlin import kotlin.math.hypot data class Point(val x: Double, val y: Double) { fun distanceTo(other: Point): Double = hypot(x - other.x, y - other.y) } fun main() { val p = Point(1.0, 2.0) println(p.distanceTo(Point(4.0, 6.0))) } Scala import scala.math.hypot final case class Point(x: Double, y: Double): def distanceTo(other: Point): Double = hypot(x - other.x, y - other.y) @main def run(): Unit = val p = Point(1.0, 2.0) println(p.distanceTo(Point(4.0, 6.0))) Java public final class Point { private final double x; private final double y; public Point(double x, double y) { this.x = x; this.y = y; } public double distanceTo(Point other) { return Math.hypot(this.x - other.x, this.y - other.y); } public static void main(String[] args) { Point p = new Point(1, 2); System.out.println(p.distanceTo(new Point(4, 6))); } } Bash #!/usr/bin/env bash # Bash has no classes. We approximate one with an associative array # for state and a function family that takes the "instance" as its # first argument. point_new() { local -n self=$1 self=([x]=$2 [y]=$3) } point_distance_to() { local -n a=$1 local -n b=$2 awk -v ax="${a[x]}" -v ay="${a[y]}" \ -v bx="${b[x]}" -v by="${b[y]}" \ 'BEGIN { print sqrt((ax-bx)^2 + (ay-by)^2) }' } declare -A p q point_new p 1 2 point_new q 4 6 point_distance_to p q Deconstruct Pulling the fields back out of a Point instance: ...

evgnomon

Code is Justice

Code is Justice By time, Indeed, mankind is in loss, except those who have taken the right direction and have made the right direction and advised each other to truth and advised each other to patience. Software projects are code, best codes are those which code is used in their development process so the developer can spend time on new functions rather than maintaining the old ones. But a building is made of bricks, does it mean it is not code? No, it is still code if that is automated by machines following a set of rules or instructions. ...

evgnomon

Coding

Coding Any programming language that is not used to develop the interpreter/compiler and the tool chain of that language is already dead! If you use command line to perform your work, you will realize that it is much easier to automate repetitive tasks by writing small scripts. That script is a function which saves you writing repeated commands. And that is all about programming, making functions to save time. ...

evgnomon

HGL General License

HGL General License What identifies you from your enemy? Your name? Who has named you? It is not reasonable for you to empower your enemy, neither for me! But I think it is reasonable to empower you, not sure about you! Still I cannot assume that you are not my enemy! We need a solution for this first and foremost so I can identify you from an enemy when I authorize you to use my work. ...

evgnomon

Own the Full Box

Own the Full Box You can not own a right you can not protect. You can not protect a right you do not own. When you send a query to an API, you send it to a Linux box. Someone owns that box, and that someone owns your query, your data, your process, and your outcome. You do not. You can not own the API without owning the box! ...

evgnomon

Privacy and Doomsday

Privacy and Doomsday And do not throw yourselves with your own hands into destruction. I do not give my information to a third party that gives it to an AI generated code to process. Instead I ask AI to give me the code I need and I use that code to process my information. I decide who has access to my information and how it is used. The only question is who is “I” and you get answer to that question by looking at who has access to your information right now. ...

evgnomon