Skip to content

Instantly share code, notes, and snippets.

View synopse's full-sized avatar
🏠
Working from the mountains

ab synopse

🏠
Working from the mountains
View GitHub Profile
@synopse
synopse / DELPHIgenerated.asm
Created March 24, 2026 21:08
FPC and Delphi for Linux asm Comparison
_ZN6Mormot4Core10Interfaces8FindGuidEPPNS1_17TInterfaceFactoryEiyy PROC
; WEAK _ZN6Mormot4Core10Interfaces8FindGuidEPPNS1_17TInterfaceFactoryEiyy
push rbp ; 0000 _ 55
mov rbp, rsp ; 0001 _ 48: 89. E5
mov qword ptr [rbp-20H], rcx ; 0004 _ 48: 89. 4D, E0
mov qword ptr [rbp-18H], rdx ; 0008 _ 48: 89. 55, E8
mov dword ptr [rbp-0CH], esi ; 000C _ 89. 75, F4
mov qword ptr [rbp-8H], rdi ; 000F _ 48: 89. 7D, F8
; Note: Immediate operand could be made smaller by sign extension
cmp dword ptr [rbp-0CH], 0 ; 0013 _ 81. 7D, F4, 00000000
@synopse
synopse / memtest.lpr
Last active March 2, 2026 16:08
FPC MM JSON tests
program memtest;
{
PURPOSE: - compare FPC memory managers on heavily multi-thread allocation
- compare JSON processing methods available on FPC
- run on Linux with FPC stable using an Intel Core i5 13500 CPU
WARNING: should have FPCMM_BOOSTER defined in mormot.core.fpcx64mm.pas
-- TJSONData free in same thread
@synopse
synopse / memtest.lpr
Last active March 2, 2026 16:15
FPC MM test
program memtest;
{$mode objfpc} {$longstrings on} {$typedaddress on} {$coperators on}
//{$modeswitch anonymousfunctions} {$modeswitch implicitfunctionspecialization}
{$warn 5024 off : Parameter not used}
// WARNING/CAUTION: please set FPCMM_BOOSTER defined in mormot.core.fpcx64mm.pas
uses
//mormot.core.fpclibcmm,
@synopse
synopse / morML.md
Last active February 27, 2026 07:54
morML - a minimalistic, indentation-only, RTTI-backed configuration language for strongly typed system

Less is morML

In a world overloaded with JSON, YAML, TOML, and XML, there’s room for a new approach — a minimalist, human-readable configuration language that treats arrays and objects naturally, without punctuation noise. Enter morML — the mORMot-inspired Configuration Language.

⚠️ Disclaimer: morML is a conceptual format, not yet implemented anywhere. It’s an idea for a cleaner, smarter alternative for configuration files. It is not a general-purpose exchange format like JSON or YAML.


The Philosophy of morML

@synopse
synopse / updateddhcpsettings.md
Last active February 26, 2026 20:29
mormot dhcp settings - part 1

Updated example JSON configurations (extended/lowercase-kebab-case style)

1. Basic: main range + one exclusion pool

{
  name: "home-lan",
  subnet: "192.168.178.0/24",
  gateway: "192.168.178.1",
@synopse
synopse / dhcpserver.md
Last active February 13, 2026 18:20
DHCP Server Settings

Sample DHCP Server settings, with specific PXE Boot options

Here is some typical settings in JSON format - but we could use .INI also if preferred:

{
  "FileName": "/opt/wapt/dhcpserver.leases",
  "FileFlushSeconds": 30,
  "MetricsFolder": "/var/log/wapt/dhcpserver",
  "MetricsCsvMinutes": 5,
  "Options": [],
  "Scope": [
c:\Temp\tempbuild\exe>mormot2tests
mORMot2 Regression Tests
--------------------------
1. Core units
1.1. Core base:
- Records: 2,110 assertions passed 449us
@synopse
synopse / duckdb.md
Last active December 18, 2025 14:14
DuckDB in mORMot 2

Great — then I’ll go end-to-end, at the level that should be actionable for a mORMot2 maintainer, not hand-wavy.

I’ll structure this into the four requested parts, but you’ll see they naturally fit together.


1. Minimal DuckDB C API binding for mORMot2

1.1 Scope discipline (critical)

@synopse
synopse / gist:8aff0000578968086b4ff9da720ebce3
Last active December 9, 2025 16:22
mormot2 tests on win64 arm - prim x86_64 exe
C:\Users\administrator\x64>mormot2tests -t coreecc -t crypto.bench
mORMot2 Regression Tests
--------------------------
1. Core units
1.4. Core crypto:
- Benchmark: 152,535 assertions passed 2.15s
@synopse
synopse / gist:45be1b06342a120d00e4cc4447630452
Last active December 9, 2025 16:23
mormot2 tests on win64 arm - native aarch64 exe
C:\test>mormot2tests -t coreecc -t crypto.bench
mORMot2 Regression Tests
--------------------------
1. Core units
1.4. Core crypto:
- Benchmark: 152,535 assertions passed 4.02s