Punch up the random network names

Swap the real PTT Telecom for Post, Telegraph & Tubes, make the carrier
pigeon an RFC 1149 one, drop the names without a twist and add a batch of
networking puns. Adds a test for the name picker.
This commit is contained in:
Frederic Jung 2026-10-24 21:35:29 +02:00
parent 3009ad8385
commit ceaf4dbb93
No known key found for this signature in database
3 changed files with 27 additions and 8 deletions

View file

@ -25,8 +25,9 @@ All notable changes to this project are documented here. The project follows
- Community exchanges: FRIES-IX, Paella-NIX, KleyWrecks, LO-NAPS, JINXED-IX, - Community exchanges: FRIES-IX, Paella-NIX, KleyWrecks, LO-NAPS, JINXED-IX,
IX Strayla and Bento-IX have their own, smaller member lists and cheaper IX Strayla and Bento-IX have their own, smaller member lists and cheaper
ports. FRIES-IX 10G and 100G ports and LAG members are free. ports. FRIES-IX 10G and 100G ports and LAG members are free.
- New networks get a random name, from Shinternet to PTT Telecom. Click - New networks get a random name, from Shinternet to Bogon Voyage. Click
"Another one" for more questionable branding, or type your own. "Another one" for more questionable branding, or type your own (#27,
thanks @NickBouwhuis).
## [1.10.0] — 2026-10-24 ## [1.10.0] — 2026-10-24

View file

@ -2650,13 +2650,14 @@ function toast(html,kind='',actions=[]){
function openModal(html){$('modalCard').innerHTML=html;$('modal').hidden=false;} function openModal(html){$('modalCard').innerHTML=html;$('modal').hidden=false;}
function closeModal(){$('modal').hidden=true;UI.pending=null;} function closeModal(){$('modal').hidden=true;UI.pending=null;}
const NETWORK_NAMES=[ const NETWORK_NAMES=[
'Packet Pals','Shinternet','PTT Telecom','Peering Pressure','Best Effort Telecom', 'Packet Pals','Shinternet','Post, Telegraph & Tubes','Peering Pressure','Best Effort Telecom',
'Mostly Online','Buffering & Sons','Lord of the Pings','The Ping Dynasty', 'Mostly Online','Buffering & Sons','Lord of the Pings','The Ping Dynasty',
'LAN Before Time','Bits Please','Packet Racket','Hopless Networks', 'LAN Before Time','Bits Please','Hopless Networks','Route of All Evil',
'Route of All Evil','TTL You Later','Fiber McFiberface','Carrier Pigeon', 'TTL You Later','Fiber McFiberface','RFC 1149 Avian Carriers','Spanning Tree Huggers',
'Spanning Tree Huggers','Dial-Up & Cry','Flaky Fiber','404 Telecom', 'Dial-Up & Cry','404 Telecom','Loss Leaders','Last Mile Standing',
'Unstable Cable','Lag Happens','Loss Leaders','Last Mile Standing', 'Have You Tried Off & On','Bogon Voyage','Default Route 66','Anycast Away',
'Have You Tried Off & On', 'Hot Potato Routing','Null Route Rangers','Looking Glass Half Full','Jumbo Frame Shop',
'Route Flap Jacks','Split Horizon & Co.','Path of Least Resistance',
]; ];
function randomNetworkName(current){ function randomNetworkName(current){
// Naming must not advance a running scenario's seeded simulation. // Naming must not advance a running scenario's seeded simulation.

View file

@ -168,3 +168,20 @@ test('RouteScript: parses safely, reports errors helpfully, and changes routing'
assert.equal(ev("S.te.script"), ''); assert.equal(ev("S.te.script"), '');
assert.deepEqual(errors, []); assert.deepEqual(errors, []);
}); });
test('#27 new networks get a random name, and "Another one" never repeats it', () => {
const { ev, errors } = load();
assert.ok(ev("NETWORK_NAMES.every(n=>n.length<=24)&&new Set(NETWORK_NAMES).size===NETWORK_NAMES.length"));
const first = ev("document.getElementById('nmIn').value");
assert.ok(ev(`NETWORK_NAMES.includes(${JSON.stringify(first)})`));
let prev = first;
for (let i = 0; i < 40; i++) {
ev("ACT.randomName()");
const now = ev("document.getElementById('nmIn').value");
assert.notEqual(now, prev);
prev = now;
}
ev("document.getElementById('nmIn').value='My Own Net';ACT.start({})");
assert.equal(ev("S.name"), 'My Own Net');
assert.deepEqual(errors, []);
});