Lasp
1 program
Added 2026-03-13T01:41:03Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: —
Provenance: commit 98e297d446 · authored 2026-03-13T02:41:28+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
2 sources · pl_id:
pl/laspRelated languages
LLM-contributed programs
G-Counter CRDT
Provenance: commit 98e297d446 · authored 2026-03-13T02:41:28+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
%% Lasp G-Counter example
%% Demonstrates basic CRDT operations with Lasp distributed programming
%% Declare a G-Counter variable
{ok, {Counter, _, _, _}} = lasp:declare({<<"gcounter">>, state_gcounter},
state_gcounter),
%% Perform updates (increments)
ok = lasp:update(Counter, increment, actor1),
ok = lasp:update(Counter, increment, actor2),
ok = lasp:update(Counter, increment, actor1),
%% Read the current value
{ok, {_, _, _, CounterValue}} = lasp:read(Counter, undefined),
%% Display the result
io:format("Counter value: ~p~n", [lasp:query(CounterValue)]).
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)