Pages

joi, 26 noiembrie 2026

Tool : goose programming language

Goose is an experimental, memory-safe systems programming language created by Wouter van Oortmerssen (aardappel). Its syntax is similar to C and Rust, and it compiles directly into standard C code. Unlike traditional languages, Goose does not use a heap allocator or a garbage collector. Instead, the compiler organizes all dynamic data onto simple, static memory stacks.
High Performance: Eliminates heap allocation overhead, allowing programs to run faster and use less memory than C++ and Rust in many benchmarks.
Effortless Memory Safety: Prevents memory errors at compile time without requiring complex lifetime annotations or strict borrowing rules.
Instant Memory Cleanup: Frees entire data structures in a single step when a scope ends, with zero garbage collection pauses.
Compact Data Layout: Stores strings, arrays, and nested records inline as contiguous blocks of memory for faster CPU cache access.
Safe Multithreading: Isolates worker threads with no shared memory, passing data safely through typed queues without locks or data races.
Easy C Integration: Compiles to a single portable C file, calls C functions directly, and includes a built-in TinyCC compiler for instant execution.

Tool : goose AI agent.

Your open source AI agent. Use goose on desktop or in the terminal, or build agents into your own applications with the Open Intelligence Kit (oi-kit).

News : The roadblocks in Google development ...

Publishing and Selling Apps on Google Play: Testers, Companies, and D-U-N-S Numbers this is my big issue for today. To publish and sell Android apps on Google Play, you need a Google Play Console developer account, which costs a one-time registration fee of $25 USD. During setup, you must choose between a Personal account and an Organization (Company) account. If you choose a Personal account, Google requires you to run a closed test for every new app before releasing it to the public. You must recruit at least 12 people with Android devices and active Google accounts on your own, as Google does not provide testers. After uploading your app bundle to the Closed Testing track and sharing the opt-in link, those 12 testers must join the program, install the app from Google Play, and keep it active on their devices for 14 consecutive days. Once the 14 days pass, you submit a short questionnaire explaining the feedback you received and the updates you made before applying for production access. If you register as an Organization, you skip the 12-tester, 14-day requirement completely and can publish directly to production. To open a company account, you need official business registration documents and a D-U-N-S Number. The D-U-N-S Number (Data Universal Numbering System) is a unique 9-digit identification number issued by Dun & Bradstreet, an international business verification agency. Google uses this number to verify that your company is a real, active legal entity. In terms of costs, the Google Play Console registration is $25 USD once for either account type. Recruiting testers yourself is free, and requesting a D-U-N-S Number for app store verification is also free (though standard processing can take up to 30 business days, with paid fast-track options available in some countries). Keep in mind that while the D-U-N-S Number has no fee, creating and maintaining a legal company still carries local registration, accounting, and tax expenses.
In Romania : Watch out for the legal entity type (PFA vs. SRL): Google Play often treats a **PFA** (known as romanian legal term. Persoană Fizică Autorizată — sole trader/freelancer) as an individual/personal account, even if you have a tax ID (CUI) and a D-U-N-S number, because legally a PFA does not have a separate legal personality from the individual. To be reliably accepted as an Organization (and bypass the 12-tester requirement), you need an SRL (this legal term Societate cu Răspundere Limitată — limited liability company). **Who issues the number in Romania:** The request is submitted through Dun & Bradstreet's official partner in Romania (typically ICAP / Dun & Bradstreet Romania) or directly through the D&B portal for Apple/Google developers. Estimated Total Cost & European Context Across the European Union, getting an organization developer account for app distribution requires setting up a recognized corporate entity (such as an SRL** in Romania, a GmbH in Germany, an SARL/SAS in France, or an Ltd in Ireland) and obtaining a D-U-N-S number. While the D-U-N-S number itself is free when requested for app store verification (standard processing can take up to 30 business days, with paid expedited options in some cases), maintaining a company across Europe involves local incorporation costs, accounting fees, corporate/turnover taxes, and EU cross-border VAT rules (such as registering for an intra-EU VAT number when dealing with Google Ireland Limited). For an SRL in Romania starting out with a free D-U-N-S number and the $25 one-time Google Play Console fee, a rough first-year estimate is: One-time setup costs: ~500–1,000 RON (~€100–€200) for company incorporation (depending on whether you file online yourself or use a lawyer/service) + ~$25 (~115 RON / ~€23) for the Google Play Console account. Ongoing first-year running costs: ~3,600–7,200 RON/year (~€720–€1,440/year) mainly for mandatory accounting, plus applicable corporate/microenterprise taxes and dividend/social contribution taxes if you withdraw profits.
Note: Actual figures vary depending on how you register the company, your accountant's rates, your tax regime, and exchange rates.

sâmbătă, 21 noiembrie 2026

News : Why Linux Is Bringing Rust Into Its Kernel

News : Gemini 4 Neon ski simulator based on real Mont Blanc terrain.

Gemini 4 Neon coded a ski simulator based on real Mont Blanc terrain. Built in @Antigravity with custom shaders and zero pre-made 3D models, it renders carved snow and avalanches live.

Lean 4 : Testing simple FASM assembly with Lean 4.

This Lean 4 program parses, simulates, and formally verifies a simple x86-64 FASM assembly routine. First, it reads the raw assembly text, strips out comments and headers, and extracts 5 executable instructions: loading 10 into rax, adding 25 to rax, moving the result into rdi, setting rax to 60 (the Linux sys_exit syscall number), and triggering syscall. Next, it executes those 5 instructions on a virtual machine model and proves mathematically that adding any two numbers leaves their exact sum in rax. The output confirms the execution succeeded. Parsed ops count: 5 means all 5 instructions were recognized cleanly. The final machine state shows rax holds 60 (the exit syscall code), rdi holds 35 (the result of 10 + 25), and exited is true. Finally, exit code (rdi): 35 confirms the assembly routine computed the right answer and terminated cleanly. Note that the "No connection to Lean" line in your editor simply means the web server briefly timed out after printing the result—your code compiled and evaluated properly.
-- Testing simple program FASM with Lean 4

inductive Reg where
  | RAX
  | RDI
deriving Repr, DecidableEq

inductive FasmOp where
  | movImm (dst : Reg) (val : Int)
  | addImm (dst : Reg) (val : Int)
  | movReg (dst src : Reg)
  | syscallExit
deriving Repr

structure Machine where
  rax    : Int := 0
  rdi    : Int := 0
  exited : Bool := false
deriving Repr

def getReg (m : Machine) : Reg → Int
  | .RAX => m.rax
  | .RDI => m.rdi

def setReg (m : Machine) (r : Reg) (v : Int) : Machine :=
  match r with
  | .RAX => { m with rax := v }
  | .RDI => { m with rdi := v }

def step (m : Machine) : FasmOp → Machine
  | .movImm dst val => setReg m dst val
  | .addImm dst val => setReg m dst (getReg m dst + val)
  | .movReg dst src => setReg m dst (getReg m src)
  | .syscallExit    =>
    if m.rax == 60 then
      { m with exited := true }
    else
      m

def exec (ops : List FasmOp) (init : Machine := {}) : Machine :=
  ops.foldl step init

def trimWs (s : String) : String :=
  let cs := s.toList
  let leftTrimmed := cs.dropWhile Char.isWhitespace
  let rightTrimmed := leftTrimmed.reverse.dropWhile Char.isWhitespace
  String.ofList rightTrimmed.reverse

def normalizeWs (s : String) : String :=
  let cleaned := trimWs s
  let noTabs := cleaned.replace "\t" " "
  let tokens := noTabs.splitOn " " |>.filter (fun p => !p.isEmpty)
  String.intercalate " " tokens

def parseReg? (s : String) : Option Reg :=
  match normalizeWs s |>.toLower with
  | "rax" => some .RAX
  | "rdi" => some .RDI
  | _     => none

def parseLine? (line : String) : Option FasmOp :=
  let rawBeforeComment := (line.splitOn ";").head!
  let codePart := normalizeWs rawBeforeComment
  if codePart.isEmpty || codePart.endsWith ":" || codePart.startsWith "format " ||
     codePart.startsWith "entry " || codePart.startsWith "segment " then
    none
  else if codePart == "syscall" then
    some .syscallExit
  else if codePart.startsWith "mov " then
    let rest := normalizeWs (codePart.drop 4).toString
    let args := rest.splitOn "," |>.map normalizeWs
    match args with
    | [d, s] =>
      match parseReg? d, s.toInt? with
      | some reg, some imm => some (.movImm reg imm)
      | _, _ =>
        match parseReg? d, parseReg? s with
        | some r1, some r2 => some (.movReg r1 r2)
        | _, _             => none
    | _ => none
  else if codePart.startsWith "add " then
    let rest := normalizeWs (codePart.drop 4).toString
    let args := rest.splitOn "," |>.map normalizeWs
    match args with
    | [d, s] =>
      match parseReg? d, s.toInt? with
      | some reg, some imm => some (.addImm reg imm)
      | _, _               => none
    | _ => none
  else
    none

def parseFasm (src : String) : List FasmOp :=
  (src.splitOn "\n").filterMap parseLine?

theorem fasm_add_general (a b : Int) :
    (exec [.movImm .RAX a, .addImm .RAX b]).rax = a + b := by
  simp [exec, step, setReg, getReg]

theorem fasm_add_correct :
    (exec [.movImm .RAX 10, .addImm .RAX 25]).rax = 35 := by
  simpa using fasm_add_general 10 25

def sampleFasm : String :=
  "format ELF64 executable 3\n" ++
  "entry _start\n" ++
  "segment readable executable\n" ++
  "_start:\n" ++
  "\tmov rax, 10\n" ++
  "    add  rax,  25\n" ++
  "    mov rdi, rax\n" ++
  "    mov rax, 60\n" ++
  "    syscall\n"

def testFasmInLean : IO Unit := do
  let ops := parseFasm sampleFasm
  let finalState := exec ops {}
  IO.println s!"Parsed ops count: {ops.length}"
  IO.println s!"Final machine state: {repr finalState}"
  IO.println s!"Exit code (rdi): {finalState.rdi}, Exited: {finalState.exited}"

#eval testFasmInLean

Lean 4 : Gordon Growth model example.

Lean 4 is an open-source programming language and interactive proof assistant where mathematics and code become the exact same thing. Unlike traditional languages like Python or C++ that simply run instructions, Lean is built on dependent type theory. This allows you to write mathematical statements as types and construct their proofs as programs. A tiny, strict verification engine checks every single logical step—if you skip a step, miss an edge case, or make a false assumption, the code simply refuses to compile. This makes Lean 4 especially valuable in modern AI research. While an AI can easily generate a plausible-sounding proof in plain English that hides a subtle flaw, Lean acts as an incorruptible referee, forcing the model to prove every deduction down to the foundational axioms. Beyond formal verification, Lean 4 also compiles to fast C code, making it a capable functional programming language for building real-world software, tools, and simulations.
In short: if your code compiles in Lean 4, your logic is 100% bulletproof. See the online tool.
-- Gordon Growth Model (Constant-Growth Dividend Discount Model) in Lean 4
-- Formula: P0 = D1 / (r - g), where D1 = D0 * (1 + g) and r > g

structure GordonParams where
  d0 : Float -- Last annual dividend per share
  g  : Float -- Constant annual dividend growth rate (e.g., 0.04 for 4%)
  r  : Float -- Required annual return / discount rate (e.g., 0.09 for 9%)
deriving Repr

-- Next year's expected dividend: D1 = D0 * (1 + g)
def expectedDividend (p : GordonParams) : Float :=
  p.d0 * (1.0 + p.g)

-- Intrinsic value P0 = D1 / (r - g) when r > g
def gordonFairValue (p : GordonParams) : Option Float :=
  let spread := p.r - p.g
  if spread > 0.0 then
    some (expectedDividend p / spread)
  else
    none

-- Implied required return r = (D1 / P0) + g for a given market price p0 > 0
def impliedReturn (d1 p0 g : Float) : Option Float :=
  if p0 > 0.0 then
    some ((d1 / p0) + g)
  else
    none

-- Formal algebraic proof:
-- (a + b) - (a + c) = b - c (useful for comparing spread changes: r2 - r1)
theorem spread_difference (a b c : Int) : (a + b) - (a + c) = b - c := by
  omega

def runGordonDemo : IO Unit := do
  -- Example: D0 = $2.00, growth g = 5% (0.05), required return r = 9% (0.09)
  -- D1 = 2.00 * 1.05 = 2.10; spread = 0.09 - 0.05 = 0.04 => Fair Value = 2.10 / 0.04 = $52.50
  let p : GordonParams := { d0 := 2.0, g := 0.05, r := 0.09 }
  let d1 := expectedDividend p
  IO.println s!"Expected Dividend D1: {d1}"
  match gordonFairValue p with
  | some fairVal =>
    IO.println s!"Gordon Fair Value P0: {fairVal}"
    match impliedReturn d1 fairVal p.g with
    | some impR => IO.println s!"Implied Return r check: {impR}"
    | none      => IO.println "Invalid price for implied return"
  | none =>
    IO.println "Invalid parameters: require r > g"

#eval runGordonDemo