's Avatar

@serpent7776

The Syntax Sorcerer aka I like programming languages.

129
Followers
10
Following
633
Posts
07.02.2024
Joined
Posts Following

Latest posts by @serpent7776

If you don't understand something, build it by hand.
Once understood, you can use AI.
Never use AI to build something you don't understand.

11.03.2026 22:23 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Every single one of these transformations is deterministic. Given the same source code, the same compiler version, and the same flags, you get the same binary. (Achieving full reproducibility across build environments is its own discipline, but the compiler itself is a pure function of its inputs.) Every transformation is designed to preserve program semantics, validated by decades of testing, billions of production hours, and enormous test suites. Formally verified compilers like CompCert go further, providing mathematical proofs of correctness. Mainstream compilers like GCC and LLVM aren’t formally proven end-to-end, but they are among the most battle-tested software artifacts humans have ever produced. And it all happens in milliseconds.

This is what Musk proposes to replace. With a language model. That hallucinates.

https://engrlog.substack.com/p/why-skip-the-code-ship-the-binary

Every single one of these transformations is deterministic. Given the same source code, the same compiler version, and the same flags, you get the same binary. (Achieving full reproducibility across build environments is its own discipline, but the compiler itself is a pure function of its inputs.) Every transformation is designed to preserve program semantics, validated by decades of testing, billions of production hours, and enormous test suites. Formally verified compilers like CompCert go further, providing mathematical proofs of correctness. Mainstream compilers like GCC and LLVM aren’t formally proven end-to-end, but they are among the most battle-tested software artifacts humans have ever produced. And it all happens in milliseconds. This is what Musk proposes to replace. With a language model. That hallucinates. https://engrlog.substack.com/p/why-skip-the-code-ship-the-binary

Now consider the alternative. A frontier LLM like Claude Opus 4.6 runs at $5 per million input tokens and $25 per million output tokens. A typical compiled binary for a non-trivial application might be tens of thousands of lines of machine code. To generate that β€œdirectly” as binary, the model would need to produce millions of tokens of output with perfect accuracy. Not 99.9% accuracy. Not β€œclose enough.” Perfect. Because tiny errors in binary don’t give you a slightly wrong answer. They give you a segfault, a security vulnerability, or undefined behavior that corrupts memory in silence. And unlike a typo in source code, which a compiler flags with a helpful error on the exact line, a wrong byte in a binary gives you nothing to work with. Debugging that is archaeology, not engineering.

https://engrlog.substack.com/p/why-skip-the-code-ship-the-binary

Now consider the alternative. A frontier LLM like Claude Opus 4.6 runs at $5 per million input tokens and $25 per million output tokens. A typical compiled binary for a non-trivial application might be tens of thousands of lines of machine code. To generate that β€œdirectly” as binary, the model would need to produce millions of tokens of output with perfect accuracy. Not 99.9% accuracy. Not β€œclose enough.” Perfect. Because tiny errors in binary don’t give you a slightly wrong answer. They give you a segfault, a security vulnerability, or undefined behavior that corrupts memory in silence. And unlike a typo in source code, which a compiler flags with a helpful error on the exact line, a wrong byte in a binary gives you nothing to work with. Debugging that is archaeology, not engineering. https://engrlog.substack.com/p/why-skip-the-code-ship-the-binary

Skipping the code

11.03.2026 21:54 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
package require Tk

# Create main window
wm title . "Auto-Refreshing Table"
wm geometry . "500x300"

# Create Treeview (table)
set tree [ttk::treeview .tree -columns {Name Value Status} -show headings]
$tree heading Name   -text "Name"
$tree heading Value  -text "Value"
$tree heading Status -text "Status"

$tree column Name   -width 150
$tree column Value  -width 150
$tree column Status -width 150

pack $tree -fill both -expand 1

# Label to show last refresh time
set timeLabel [label .lbl -text "Last refresh: never"]
pack $timeLabel

# Procedure to refresh table data
proc refreshTable {} {
    global tree timeLabel

    # Clear existing rows
    $tree delete [$tree children {}]

    # Insert new/updated data (replace this with your real data source)
    $tree insert {} end -values [list "Temperature"  [expr {int(rand()*100)}]  "OK"]
    $tree insert {} end -values [list "Humidity"     [expr {int(rand()*100)}]  "OK"]
    $tree insert {} end -values [list "Pressure"     [expr {int(rand()*100)}]  "WARN"]
    $tree insert {} end -values [list "CPU Load"     [expr {int(rand()*100)}]  "OK"]

    # Update timestamp
    $timeLabel config -text "Last refresh: [clock format [clock seconds] -format {%H:%M:%S}]"

    # Schedule next refresh in 3000ms (3 seconds)
    after 3000 refreshTable
}

# Start the refresh loop
refreshTable

package require Tk # Create main window wm title . "Auto-Refreshing Table" wm geometry . "500x300" # Create Treeview (table) set tree [ttk::treeview .tree -columns {Name Value Status} -show headings] $tree heading Name -text "Name" $tree heading Value -text "Value" $tree heading Status -text "Status" $tree column Name -width 150 $tree column Value -width 150 $tree column Status -width 150 pack $tree -fill both -expand 1 # Label to show last refresh time set timeLabel [label .lbl -text "Last refresh: never"] pack $timeLabel # Procedure to refresh table data proc refreshTable {} { global tree timeLabel # Clear existing rows $tree delete [$tree children {}] # Insert new/updated data (replace this with your real data source) $tree insert {} end -values [list "Temperature" [expr {int(rand()*100)}] "OK"] $tree insert {} end -values [list "Humidity" [expr {int(rand()*100)}] "OK"] $tree insert {} end -values [list "Pressure" [expr {int(rand()*100)}] "WARN"] $tree insert {} end -values [list "CPU Load" [expr {int(rand()*100)}] "OK"] # Update timestamp $timeLabel config -text "Last refresh: [clock format [clock seconds] -format {%H:%M:%S}]" # Schedule next refresh in 3000ms (3 seconds) after 3000 refreshTable } # Start the refresh loop refreshTable

That's how simple my dashboard UI I want to look like. Why can't any reactive framework match this? Am I using it wrong?

11.03.2026 18:06 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Get ready for BobKonf.

11.03.2026 17:15 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Backend development is dead and ai killed it.

10.03.2026 21:57 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I looked into some reactive UI frameworks and dropped it, because it doesn't seem it improves anything.
But I'll look into htmx and datastar next time, thanks.

10.03.2026 21:25 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
sqlite> CREATE TABLE x1(a, b, c);                  -- Create table in database 
sqlite> .expert
sqlite> SELECT * FROM x1 WHERE a=? AND b>?;        -- Analyze this SELECT 
CREATE INDEX x1_idx_000123a7 ON x1(a, b);

0|0|0|SEARCH TABLE x1 USING INDEX x1_idx_000123a7 (a=? AND b>?)

sqlite> CREATE INDEX x1ab ON x1(a, b);             -- Create the recommended index 
sqlite> .expert
sqlite> SELECT * FROM x1 WHERE a=? AND b>?;        -- Re-analyze the same SELECT 
(no new indexes)

0|0|0|SEARCH TABLE x1 USING INDEX x1ab (a=? AND b>?)

https://www.sqlite.org/cli.html#index_recommendations_sqlite_expert_

sqlite> CREATE TABLE x1(a, b, c); -- Create table in database sqlite> .expert sqlite> SELECT * FROM x1 WHERE a=? AND b>?; -- Analyze this SELECT CREATE INDEX x1_idx_000123a7 ON x1(a, b); 0|0|0|SEARCH TABLE x1 USING INDEX x1_idx_000123a7 (a=? AND b>?) sqlite> CREATE INDEX x1ab ON x1(a, b); -- Create the recommended index sqlite> .expert sqlite> SELECT * FROM x1 WHERE a=? AND b>?; -- Re-analyze the same SELECT (no new indexes) 0|0|0|SEARCH TABLE x1 USING INDEX x1ab (a=? AND b>?) https://www.sqlite.org/cli.html#index_recommendations_sqlite_expert_

#TIL about .expert in sqlite

10.03.2026 21:20 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I'll guess I'm staying with plain javascript for now and not switching to any reactive ui framework at this point.

10.03.2026 18:34 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
r.cpp:23:15: fatal error: recursive template instantiation exceeded maximum depth of 1024
   23 |         using rest = rev<t>::output;
      |                      ^
r.cpp:23:15: note: in instantiation of template class
      'rev<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail

r.cpp:23:15: fatal error: recursive template instantiation exceeded maximum depth of 1024 23 | using rest = rev<t>::output; | ^ r.cpp:23:15: note: in instantiation of template class 'rev<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail<tail

C++ error messages can be fun

10.03.2026 18:10 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Initial GPT-5.4 impression:
Me: asks a question
GPT: wall of text that repeats itself at few points

It's more responsive than 5.3 though.

10.03.2026 17:58 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

LLMs made machines behave more like a human, which is not necessarily a good thing.
Machines used to be deterministic and reliable, humans aren't.

09.03.2026 17:51 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Right now I have plain html+javascript served by nginx.
This already it a mess of ifs and I only have 3 buttons.
I'm not frontend guy, so I'd prefer something non complex.

09.03.2026 17:45 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
#include <type_traits>

template<typename ...Ts>
struct types;

template<typename ...Ts>
struct unpack
{
	using type = types<Ts...>;
};

template<typename ...Ps, typename ...Ts>
struct unpack<types<Ps...>, Ts...>
{
	using type = types<Ps..., Ts...>;
};

template<typename H, typename ...Tail>
struct rev
{
	using rest = typename rev<Tail...>::type;
	using type = typename unpack<rest, H>::type;
};

template<typename T>
struct rev<T>
{
	using type = types<T>;
};

struct Point
{
	int x;
	int y;
};

int main()
{
	static_assert(std::is_same_v<rev<int, bool, Point>::type, types<Point, bool, int>>);
	static_assert(std::is_same_v<rev<int, bool, char>::type, types<char, bool, int>>);
	static_assert(std::is_same_v<rev<int, int>::type, types<int, int>>);
	static_assert(std::is_same_v<rev<int>::type, types<int>>);
}

#include <type_traits> template<typename ...Ts> struct types; template<typename ...Ts> struct unpack { using type = types<Ts...>; }; template<typename ...Ps, typename ...Ts> struct unpack<types<Ps...>, Ts...> { using type = types<Ps..., Ts...>; }; template<typename H, typename ...Tail> struct rev { using rest = typename rev<Tail...>::type; using type = typename unpack<rest, H>::type; }; template<typename T> struct rev<T> { using type = types<T>; }; struct Point { int x; int y; }; int main() { static_assert(std::is_same_v<rev<int, bool, Point>::type, types<Point, bool, int>>); static_assert(std::is_same_v<rev<int, bool, char>::type, types<char, bool, int>>); static_assert(std::is_same_v<rev<int, int>::type, types<int, int>>); static_assert(std::is_same_v<rev<int>::type, types<int>>); }

Reversing the order of types in a parameter pack in #cplusplus (nostd, 100% organic code)

09.03.2026 17:35 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Investigating straightforward, low overhead, quick to start reactive UI framework. Any recommendations?

08.03.2026 20:51 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Live updates: ON/OFF button

Live updates: ON/OFF button

You can now disable live updates on hive-index.

08.03.2026 18:03 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Sometimes I wonder whether we should thank Dennis Ritchie for designing C or curse him.
If C wasn't created we all could be writing in descendants of Modula, ML or Lisp.

07.03.2026 21:51 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
-- Lux Language Reference (brief)
-- ──────────────────────────────
--   Types
--     pixel         Packed ABGR u32 or decoded {r,g,b,a} float channels
--     image         2-D grid of pixels with .width, .height, .data
--     color         Named vector in a colorspace (e.g. yiq.y, yiq.i, yiq.q)
--     region        Rectangular area {x1, y1, x2, y2}
--     scalar        f64 numeric value

-- Lux Language Reference (brief) -- ────────────────────────────── -- Types -- pixel Packed ABGR u32 or decoded {r,g,b,a} float channels -- image 2-D grid of pixels with .width, .height, .data -- color Named vector in a colorspace (e.g. yiq.y, yiq.i, yiq.q) -- region Rectangular area {x1, y1, x2, y2} -- scalar f64 numeric value

I asked Claude to investigate odiff image comparison algorithm and design a language that express the same in less code. This is what it did.

"The Lux version is roughly 3x shorter than the Zig source while remaining unambiguous"

gist.github.com/serpent7776/...

07.03.2026 18:26 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
# 	Custom JSON ID 	Count 	Percent 	Latest Block
1	sm_market_rent	358,968,236	13.8%	104,426,058
2	ssc-mainnet-hive	344,710,658	13.2%	104,426,918

https://index.hive-adventures.com/

# Custom JSON ID Count Percent Latest Block 1 sm_market_rent 358,968,236 13.8% 104,426,058 2 ssc-mainnet-hive 344,710,658 13.2% 104,426,918 https://index.hive-adventures.com/

hive-index has now percent column.
Looks like sm_market_rent and ssc-mainnet-hive take 27% of all custom json operations.

07.03.2026 17:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
An orange tabby cat peeks out from the center of a massive, tangled ball of colorful wires, yarn, and mechanical gears. The ball sits on a cluttered wooden workbench surrounded by soldering irons, circuit boards, and books. A thought bubble above the cat's head reads, "COMPLEXITY KILLED THE CAT."

An orange tabby cat peeks out from the center of a massive, tangled ball of colorful wires, yarn, and mechanical gears. The ball sits on a cluttered wooden workbench surrounded by soldering irons, circuit boards, and books. A thought bubble above the cat's head reads, "COMPLEXITY KILLED THE CAT."

"Complexity killed the cat"

07.03.2026 14:36 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
       --allow-empty
	   Usually recording a commit that has the exact same tree as its sole
	   parent commit is a mistake, and the command prevents	you from
	   making such a commit. This option bypasses the safety, and is
	   primarily for use by	foreign	SCM interface scripts.

https://man.freebsd.org/cgi/man.cgi?sektion=0&manpath=FreeBSD%2013.1-RELEASE%20and%20Ports&arch=default&format=html&query=git-commit

--allow-empty Usually recording a commit that has the exact same tree as its sole parent commit is a mistake, and the command prevents you from making such a commit. This option bypasses the safety, and is primarily for use by foreign SCM interface scripts. https://man.freebsd.org/cgi/man.cgi?sektion=0&manpath=FreeBSD%2013.1-RELEASE%20and%20Ports&arch=default&format=html&query=git-commit

#TIL about git commit --alow-empty

07.03.2026 13:52 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

hive-index now flashes green briefly for updated entries.

06.03.2026 22:11 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

What's the point of ORMs when I can change underlying database with one prompt?

06.03.2026 19:23 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

AI: I can't look up live data from this environment.
Me: why can't you look it up?
AI: You're right, let me try fetching it.
Me: 🀦

06.03.2026 17:04 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
https://index.hive-adventures.com/

https://index.hive-adventures.com/

I build a real time custom json operations dashboard for Hive blockchain.

05.03.2026 21:21 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

GPT5.3 Codex X-High be like:
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts
Thoughts

03.03.2026 22:09 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Error while editing /dev/null

Error while editing /dev/null

Why tf are you trying to edit /dev/null GPT?

03.03.2026 21:55 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
I hit a chain of internal action errors by repeatedly trying to update non-existent tracked items, and the environment halted further actions for this turn.

How do you want to proceed?

I can continue without further workspace actions and just give you the exact run/verify steps for the new probe binary.
Or you can ask me to resume normal editing/checking in the next turn, and I’ll continue from there.

I hit a chain of internal action errors by repeatedly trying to update non-existent tracked items, and the environment halted further actions for this turn. How do you want to proceed? I can continue without further workspace actions and just give you the exact run/verify steps for the new probe binary. Or you can ask me to resume normal editing/checking in the next turn, and I’ll continue from there.

tf that even means GPT?

03.03.2026 21:12 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
From a high-level perspective, table storage is organized into a four-layer hierarchy:

β€’ A Table is horizontally partitioned by rows into multiple Row Groups.

β€’ A Row Group is vertically partitioned by columns into multiple Column Data objects.

β€’ A Column Data object is further horizontally partitioned by rows into multiple Column Segments.

β€’ A Column Segment represents the actual stored data. It typically corresponds to a single 256-KB Data Block but may also share a block with other segments.

https://www.alibabacloud.com/blog/duckdb-internals---part-2-table-storage-format_602657

From a high-level perspective, table storage is organized into a four-layer hierarchy: β€’ A Table is horizontally partitioned by rows into multiple Row Groups. β€’ A Row Group is vertically partitioned by columns into multiple Column Data objects. β€’ A Column Data object is further horizontally partitioned by rows into multiple Column Segments. β€’ A Column Segment represents the actual stored data. It typically corresponds to a single 256-KB Data Block but may also share a block with other segments. https://www.alibabacloud.com/blog/duckdb-internals---part-2-table-storage-format_602657

duckdb table storage layout.

02.03.2026 21:29 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
module IntTuple = struct
  type t = int * int

  let compare (x0, y0) (x1, y1) =
    match Pervasives.compare x0 x1 with
      0 -> Pervasives.compare y0 y1
    | c -> c
end

module IntTupleSet = Set.Make(IntTuple)

module IntTuple = struct type t = int * int let compare (x0, y0) (x1, y1) = match Pervasives.compare x0 x1 with 0 -> Pervasives.compare y0 y1 | c -> c end module IntTupleSet = Set.Make(IntTuple)

There seriously isn't easier way to construct a set of tuples in ocaml?

02.03.2026 17:52 πŸ‘ 3 πŸ” 1 πŸ’¬ 2 πŸ“Œ 0

Hold on, I need a unification algorithm.

28.02.2026 15:48 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0