Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
843 lines (787 loc) · 79.4 KB
/
Copy pathindex.html
File metadata and controls
843 lines (787 loc) · 79.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>With — an ergonomics-first systems language</title>
<meta name="description" content="With is an ergonomics-first systems language: close to the machine, native by default, exactly as safe as Rust, and built to remove the suffering. First-class C interop, no ceremony, self-hosting.">
<meta name="theme-color" content="#0b0d12">
<link rel="canonical" href="https://withlang.org/">
<meta property="og:title" content="With — an ergonomics-first systems language">
<meta property="og:description" content="Close to the machine. Exactly as safe as Rust. Built to remove the suffering.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://withlang.org/">
<meta property="og:site_name" content="With">
<meta property="og:image" content="https://withlang.org/assets/social-card.jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="A With program drawing a rainbow spiral in a native window, launched with one command">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="With — an ergonomics-first systems language">
<meta name="twitter:description" content="Close to the machine. Exactly as safe as Rust. Built to remove the suffering.">
<meta name="twitter:image" content="https://withlang.org/assets/social-card.jpg">
<meta name="twitter:image:alt" content="A With program drawing a rainbow spiral in a native window, launched with one command">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%230b0d12'/%3E%3Cpath d='M14 22 L21 44 L28 28 L35 44 L42 22' fill='none' stroke='%232dd4bf' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='48' cy='42' r='3.5' fill='%238b7cff'/%3E%3C/svg%3E">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
<style>
:root{
--bg:#0b0d12; --bg2:#0e111a; --surface:#141824; --surface2:#191e2c;
--border:rgba(255,255,255,.08); --border2:rgba(255,255,255,.13);
--text:#e8ebf2; --muted:#98a1b3; --faint:#6b7488;
--accent:#2dd4bf; --accent-ink:#052e2a; --accent2:#8b7cff;
--code-bg:#0b0e16;
--k:#8b7cff; --s:#2dd4bf; --c:#5f6b82; --fn:#7cc7ff; --num:#ffb86b; --typ:#f4a8d0; --op:#c3cbdd;
--shadow:0 30px 80px -30px rgba(0,0,0,.7);
--display:"Space Grotesk",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
--sans:system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,sans-serif;
--mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
:root[data-theme="light"]{
--bg:#ffffff; --bg2:#f7f8fc; --surface:#ffffff; --surface2:#f4f6fb;
--border:rgba(12,16,26,.10); --border2:rgba(12,16,26,.16);
--text:#111624; --muted:#54607a; --faint:#8a93a8;
--accent:#0d9488; --accent-ink:#ffffff; --accent2:#6d5cf0;
--code-bg:#0c1018; --k:#a78bff; --s:#3dd7c4; --c:#7d8aa3; --fn:#7cc7ff; --num:#ffb86b; --typ:#f4a8d0; --op:#c3cbdd;
--shadow:0 24px 60px -28px rgba(20,30,60,.35);
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:var(--sans);background:var(--bg);color:var(--text);line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:hidden}
a{color:inherit;text-decoration:none}
.wrap{max-width:1140px;margin:0 auto;padding:0 24px}
h1,h2,h3,.display{font-family:var(--display);letter-spacing:-.02em;line-height:1.1;font-weight:700}
code,pre,.mono{font-family:var(--mono)}
.accent{color:var(--accent)}
.grad-text{background:linear-gradient(100deg,var(--accent),var(--accent2));-webkit-background-clip:text;background-clip:text;color:transparent}
/* buttons */
.btn{display:inline-flex;align-items:center;gap:.55rem;padding:.72rem 1.15rem;border-radius:11px;font-weight:600;font-size:.95rem;border:1px solid transparent;cursor:pointer;transition:transform .12s ease,background .2s,border-color .2s,box-shadow .2s;white-space:nowrap}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--accent);color:var(--accent-ink);box-shadow:0 8px 30px -12px var(--accent)}
.btn-primary:hover{filter:brightness(1.06);box-shadow:0 12px 34px -10px var(--accent)}
.btn-ghost{background:var(--surface);border-color:var(--border2);color:var(--text)}
.btn-ghost:hover{border-color:var(--accent);color:var(--accent)}
.btn svg{width:18px;height:18px}
/* header */
header{position:sticky;top:0;z-index:50;backdrop-filter:blur(14px);background:color-mix(in srgb,var(--bg) 78%,transparent);border-bottom:1px solid var(--border)}
.nav{display:flex;align-items:center;justify-content:space-between;height:66px}
.logo{display:flex;align-items:center;gap:.6rem;font-family:var(--display);font-weight:700;font-size:1.28rem}
.logo svg{width:30px;height:30px}
.logo b{font-weight:700}
.logo .dot{color:var(--accent2)}
.nav-links{display:flex;align-items:center;gap:.15rem}
.nav-links a{padding:.5rem .65rem;white-space:nowrap;border-radius:9px;color:var(--muted);font-weight:500;font-size:.95rem;transition:color .18s,background .18s}
.nav-links a:hover{color:var(--text);background:var(--surface)}
.nav-right{display:flex;align-items:center;gap:.6rem}
.vpill{display:inline-flex;align-items:center;gap:.4rem;font-family:var(--mono);font-size:.78rem;color:var(--muted);border:1px solid var(--border2);border-radius:999px;padding:.3rem .6rem}
.vpill .live{width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 25%,transparent)}
.icon-btn{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;border:1px solid var(--border2);background:var(--surface);color:var(--muted);cursor:pointer}
.icon-btn:hover{color:var(--text);border-color:var(--accent)}
.icon-btn svg{width:18px;height:18px}
.socials{display:flex;align-items:center;gap:.15rem}
.socials a{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;color:var(--muted);transition:color .18s,background .18s}
.socials a:hover{color:var(--text);background:var(--surface)}
.socials svg{width:19px;height:19px}
.foot-brand .socials{margin:1rem 0 0 -.45rem}
.socials a.share-li,.nav-share{display:inline-flex;color:var(--muted);align-items:center;gap:.4rem;width:auto;height:30px;margin-left:.45rem;padding:0 .75rem;border:1px solid var(--border2);border-radius:999px;font-size:.8rem;font-weight:500;white-space:nowrap}
.socials a.share-li:hover,.nav-share:hover{border-color:var(--accent);color:var(--accent);background:transparent}
.socials a.share-li svg,.nav-share svg{width:14px;height:14px}
.hamb{display:none}
/* hero */
.hero{position:relative;padding:96px 0 64px;overflow:hidden}
.hero::before{content:"";position:absolute;inset:-40% 0 auto 0;height:720px;background:
radial-gradient(600px 340px at 22% 12%,color-mix(in srgb,var(--accent) 22%,transparent),transparent 70%),
radial-gradient(560px 360px at 82% 6%,color-mix(in srgb,var(--accent2) 20%,transparent),transparent 68%);
pointer-events:none;filter:blur(6px);z-index:0}
.hero .wrap{position:relative;z-index:1}
.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:52px;align-items:center}
.demo{margin:0}
.demo video,.demo img,.demo video{display:block;width:100%;height:auto;border-radius:14px;border:1px solid var(--border2);box-shadow:var(--shadow);background:#282c34}
img,video{max-width:100%}
/* Grid children keep their intrinsic minimum width by default; a nowrap line or a sized video would hold a column open past the viewport. */
.hero-grid>*,.showcase>*,.install-grid>*,.cards>*,.founder>*,.wipe-intro>*,.wipe-details>*,.foot-grid>*{min-width:0}
.demo figcaption{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:.5rem;margin-top:.9rem;font-family:var(--mono);font-size:.78rem;color:var(--faint)}
.demo figcaption a{color:var(--accent)}
.demo .live{width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 25%,transparent)}
.window.hello{max-width:640px;margin:0 0 28px}
.eyebrow{display:inline-flex;align-items:center;gap:.5rem;font-family:var(--mono);font-size:.8rem;color:var(--accent);border:1px solid color-mix(in srgb,var(--accent) 35%,transparent);background:color-mix(in srgb,var(--accent) 8%,transparent);border-radius:999px;padding:.32rem .7rem;margin-bottom:1.3rem}
.hero h1{font-size:clamp(2.3rem,5vw,3.6rem);margin-bottom:1.1rem}
.hero p.lede{font-size:1.16rem;color:var(--muted);max-width:34ch;margin-bottom:1.7rem}
.hero-cta{display:flex;gap:.8rem;flex-wrap:wrap;margin-bottom:1.5rem}
.subnote{color:var(--faint);font-size:.86rem;display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.subnote code{color:var(--muted)}
/* install command box */
.cmd{display:flex;align-items:center;gap:.6rem;background:var(--code-bg);border:1px solid var(--border2);border-radius:12px;padding:.7rem .8rem .7rem 1rem;font-family:var(--mono);font-size:.88rem;color:#dfe6f2;max-width:520px;margin-bottom:1.1rem}
.cmd .p{color:var(--accent)}
.cmd .t{overflow-x:auto;white-space:nowrap;flex:1}
.cmd .t::-webkit-scrollbar{height:0}
.copy{margin-left:auto;display:grid;place-items:center;width:34px;height:32px;border-radius:8px;border:1px solid var(--border2);background:var(--surface);color:var(--muted);cursor:pointer;flex:none;transition:.15s}
.copy:hover{color:var(--accent);border-color:var(--accent)}
.copy svg{width:15px;height:15px}
.copy.ok{color:var(--accent);border-color:var(--accent)}
/* code window */
.window{background:var(--code-bg);border:1px solid var(--border2);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
.win-bar{display:flex;align-items:center;gap:.5rem;padding:.7rem .9rem;border-bottom:1px solid var(--border);background:linear-gradient(180deg,rgba(255,255,255,.03),transparent)}
.dots{display:flex;gap:.42rem}
.dots i{width:11px;height:11px;border-radius:50%;display:block}
.dots i:nth-child(1){background:#ff5f57}.dots i:nth-child(2){background:#febc2e}.dots i:nth-child(3){background:#28c840}
.win-name{margin-left:.4rem;font-family:var(--mono);font-size:.78rem;color:var(--faint)}
pre.code{margin:0;padding:1.1rem 1.25rem;font-size:.86rem;line-height:1.7;overflow-x:auto;color:#dfe6f2;tab-size:4}
pre.code .k{color:var(--k)}pre.code .s{color:var(--s)}pre.code .c{color:var(--c);font-style:italic}
pre.code .fn{color:var(--fn)}pre.code .num{color:var(--num)}pre.code .t{color:var(--typ)}pre.code .op{color:var(--op)}
.win-run{border-top:1px solid var(--border);padding:.7rem 1.25rem;font-family:var(--mono);font-size:.82rem;color:var(--muted);background:rgba(255,255,255,.015)}
.win-run .p{color:var(--accent)}.win-run .out{color:var(--text)}
/* getting started walkthrough */
.start-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px;align-items:stretch}
.start-grid .window{display:flex;flex-direction:column}
.term{background:var(--code-bg);border:1px solid var(--border2);border-radius:16px;box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column}
.term pre{margin:0;padding:1.15rem 1.35rem;font-family:var(--mono);font-size:.9rem;line-height:1.85;color:#dfe6f2;overflow-x:auto;flex:1}
.term .p{color:var(--accent);user-select:none}
.term .cm{color:var(--fn)}
.term .ok{color:var(--num)}
.term .mut{color:var(--faint)}
.term .cur{display:inline-block;width:9px;height:1.05em;vertical-align:-2px;background:var(--accent);animation:blink 1.1s steps(2) infinite;border-radius:1px}
@keyframes blink{50%{opacity:0}}
.start-steps{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:26px}
.step{flex:1;min-width:200px;background:var(--surface);border:1px solid var(--border);border-radius:13px;padding:16px 18px}
.step .no{font-family:var(--mono);color:var(--accent);font-size:.78rem;margin-bottom:.35rem}
.step h4{font-family:var(--display);font-size:1.02rem;margin-bottom:.3rem;display:flex;align-items:center;gap:.5rem}
.step h4 code{font-family:var(--mono);font-size:.82rem;background:var(--surface2);border:1px solid var(--border);border-radius:6px;padding:.05rem .4rem;color:var(--accent)}
.step p{color:var(--muted);font-size:.9rem}
.start-note{margin-top:24px;display:flex;gap:.6rem;align-items:flex-start;background:color-mix(in srgb,var(--accent) 6%,var(--surface));border:1px solid color-mix(in srgb,var(--accent) 22%,var(--border));border-radius:13px;padding:16px 18px;color:var(--muted);font-size:.95rem}
.start-note svg{width:20px;height:20px;color:var(--accent);flex:none;margin-top:2px}
.start-note b{color:var(--text)}
.start-note a{color:var(--accent);border-bottom:1px solid color-mix(in srgb,var(--accent) 40%,transparent)}
/* sections */
section{padding:76px 0;position:relative}
.section-head{max-width:620px;margin-bottom:44px}
.section-head .kick{font-family:var(--mono);font-size:.8rem;color:var(--accent);letter-spacing:.08em;text-transform:uppercase;margin-bottom:.8rem}
.section-head h2{font-size:clamp(1.8rem,3.4vw,2.5rem);margin-bottom:.8rem}
.section-head p{color:var(--muted);font-size:1.06rem}
.divider{border:0;border-top:1px solid var(--border)}
/* why cards */
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:26px;transition:transform .18s,border-color .18s,background .18s}
.card:hover{transform:translateY(-4px);border-color:var(--border2);background:var(--surface2)}
.card .ic{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;margin-bottom:1rem;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent)}
.card .ic svg{width:22px;height:22px}
.card h3{font-size:1.2rem;margin-bottom:.55rem}
.card p{color:var(--muted);font-size:.97rem}
.card p b{color:var(--text);font-weight:600}
/* built with With */
#wipe{scroll-margin-top:86px;background:linear-gradient(160deg,color-mix(in srgb,var(--accent2) 7%,var(--bg)),var(--bg));border-block:1px solid var(--border)}
.wipe-intro{display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:end;margin-bottom:30px}
.wipe-intro .section-head{margin:0}
.wipe-intro h2{font-size:clamp(2.5rem,5vw,4rem);letter-spacing:-.045em}
.wipe-intro h2 span{color:var(--accent)}
.wipe-copy p{color:var(--muted);font-size:1.03rem;margin-bottom:20px}
.wipe-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px;list-style:none}
.wipe-tags li{font-family:var(--mono);font-size:.74rem;padding:.3rem .6rem;border:1px solid var(--border2);border-radius:6px;color:var(--muted);background:var(--surface)}
.wipe-film{margin:0;border:1px solid var(--border2);border-radius:18px;overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}
.wipe-film video{display:block;width:100%;height:auto;aspect-ratio:1114/720;background:#050810}
.wipe-film figcaption{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:16px 20px;color:var(--muted);font-size:.82rem}
.wipe-film figcaption a{color:var(--accent)}
.wipe-details{display:grid;grid-template-columns:repeat(3,1fr);gap:28px;margin-top:30px}
.wipe-details h3{font-size:1.05rem;margin-bottom:8px}
.wipe-details p{font-size:.92rem;color:var(--muted)}
@media(max-width:900px){.wipe-intro{grid-template-columns:1fr;gap:20px}.wipe-details{grid-template-columns:1fr;gap:20px}}
/* code showcase */
.showcase{display:grid;grid-template-columns:.9fr 1.1fr;gap:36px;align-items:start}
.tablist{display:flex;flex-direction:column;gap:8px}
.tab{text-align:left;padding:16px 18px;border-radius:13px;border:1px solid var(--border);background:var(--surface);cursor:pointer;transition:.16s;color:var(--text)}
.tab:hover{border-color:var(--border2)}
.tab.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--surface))}
.tab .th{font-family:var(--display);font-weight:600;font-size:1.02rem;display:flex;align-items:center;gap:.55rem}
.tab .td{color:var(--muted);font-size:.9rem;margin-top:.25rem}
.tab .th .n{font-family:var(--mono);font-size:.75rem;color:var(--faint)}
.panel{display:none}.panel.active{display:block;animation:fade .25s ease}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
/* install */
.install-tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:20px}
.itab{padding:.5rem .9rem;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--muted);cursor:pointer;font-weight:600;font-size:.9rem;font-family:var(--sans)}
.itab.active{color:var(--accent);border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--surface))}
.ipanel{display:none}.ipanel.active{display:block}
.install-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:32px;align-items:start}
.big-cmd{background:var(--code-bg);border:1px solid var(--border2);border-radius:14px;overflow:hidden}
.big-cmd .top{display:flex;align-items:center;justify-content:space-between;padding:.6rem .9rem;border-bottom:1px solid var(--border);color:var(--faint);font-family:var(--mono);font-size:.78rem}
.big-cmd pre{margin:0;padding:1rem 1.1rem;font-family:var(--mono);font-size:.9rem;color:#dfe6f2;overflow-x:auto;line-height:1.7}
.big-cmd .p{color:var(--accent)}
.notes{color:var(--muted);font-size:.95rem}
.notes h4{font-family:var(--display);color:var(--text);margin-bottom:.5rem;font-size:1.05rem}
.notes ul{list-style:none;margin:.4rem 0 1.2rem}
.notes li{padding-left:1.4rem;position:relative;margin-bottom:.5rem}
.notes li::before{content:"";position:absolute;left:0;top:.6em;width:6px;height:6px;border-radius:50%;background:var(--accent)}
.notes code{background:var(--surface2);border:1px solid var(--border);border-radius:6px;padding:.05rem .35rem;font-size:.85em;color:var(--text)}
.notes a{color:var(--accent);border-bottom:1px solid color-mix(in srgb,var(--accent) 40%,transparent)}
/* founder */
.founder{display:grid;grid-template-columns:200px 1fr;gap:40px;align-items:start;background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:38px}
.founder img{width:150px;height:150px;border-radius:20px;object-fit:cover;border:1px solid var(--border2)}
.founder .photo-wrap{position:relative}
.founder .photo-wrap::after{content:"";position:absolute;inset:-2px;border-radius:22px;background:linear-gradient(140deg,var(--accent),var(--accent2));z-index:-1;opacity:.55;filter:blur(10px)}
.founder h3{font-size:1.5rem;margin-bottom:.2rem}
.founder .role{color:var(--accent);font-family:var(--mono);font-size:.85rem;margin-bottom:1rem}
.founder p{color:var(--muted);margin-bottom:.9rem;max-width:62ch}
.founder p b{color:var(--text);font-weight:600}
.founder .links{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:.4rem}
.founder .links a{font-size:.88rem;color:var(--muted);border:1px solid var(--border2);border-radius:9px;padding:.4rem .7rem;transition:.15s}
.founder .links a:hover{color:var(--accent);border-color:var(--accent)}
/* stats / cta */
.cta{background:linear-gradient(140deg,color-mix(in srgb,var(--accent) 14%,var(--surface)),color-mix(in srgb,var(--accent2) 12%,var(--surface)));border:1px solid var(--border2);border-radius:22px;padding:56px;text-align:center}
.cta h2{font-size:clamp(1.8rem,3.4vw,2.5rem);margin-bottom:.8rem}
.cta p{color:var(--muted);max-width:52ch;margin:0 auto 1.6rem}
.cta .btns{display:flex;gap:.8rem;justify-content:center;flex-wrap:wrap}
/* footer */
footer{border-top:1px solid var(--border);padding:56px 0 40px;color:var(--muted)}
.foot-grid{display:grid;grid-template-columns:1.4fr repeat(3,1fr);gap:32px;margin-bottom:40px}
.foot-brand p{font-size:.92rem;max-width:34ch;margin-top:.8rem}
.foot-col h5{font-family:var(--display);color:var(--text);font-size:.95rem;margin-bottom:.9rem}
.foot-col a{display:block;color:var(--muted);font-size:.92rem;padding:.28rem 0;transition:color .15s}
.foot-col a:hover{color:var(--accent)}
.foot-bottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--border);padding-top:24px;font-size:.88rem;color:var(--faint);gap:16px;flex-wrap:wrap}
.foot-bottom .mono{font-family:var(--mono)}
/* reveal */
.reveal{opacity:0;transform:translateY(18px);transition:opacity .6s ease,transform .6s ease}
.reveal.in{opacity:1;transform:none}
/* mobile menu */
.mobile{display:none}
@media(max-width:1400px){.nav-socials{display:none}}
@media(max-width:1060px){.nav-share{display:none}}
@media(max-width:900px){
.hero-grid{grid-template-columns:1fr;gap:36px}
.hero p.lede{max-width:none}
.cards{grid-template-columns:1fr}
.showcase{grid-template-columns:1fr;gap:20px}
.install-grid{grid-template-columns:1fr;gap:24px}
.founder{grid-template-columns:1fr;justify-items:start}
.foot-grid{grid-template-columns:1fr 1fr}
.nav-links{display:none}
.hamb{display:grid}
.vpill{display:none}
.mobile.open{display:block;position:fixed;inset:66px 0 auto 0;background:var(--bg);border-bottom:1px solid var(--border);padding:16px 24px 24px;z-index:49}
.nav-socials{display:none}
.mobile .socials{padding-top:.75rem;margin-left:-.45rem}
.mobile>a{display:block;padding:.75rem 0;color:var(--text);font-weight:500;border-bottom:1px solid var(--border)}
}
@media(max-width:560px){
.wrap{padding:0 16px}
.foot-grid{grid-template-columns:1fr}
.cta{padding:36px 24px}
.founder{padding:26px}
.eyebrow{white-space:normal;max-width:100%;line-height:1.4}
.hero h1{font-size:2.1rem;letter-spacing:-.03em}
.hero-cta .btn{width:100%;justify-content:center}
pre{font-size:.82rem;padding:.9rem 1rem}
.cmd{font-size:.82rem}
.wipe-intro h2{font-size:2.2rem}
}
@media(prefers-reduced-motion:reduce){.reveal{opacity:1;transform:none;transition:none}}
</style>
</head>
<body>
<header>
<div class="wrap nav">
<a class="logo" href="/" aria-label="With home">
<svg viewBox="0 0 64 64" aria-hidden="true"><rect width="64" height="64" rx="14" fill="none"/><path d="M14 22 L21 44 L28 28 L35 44 L42 22" fill="none" stroke="var(--accent)" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/><circle cx="48" cy="42" r="3.5" fill="var(--accent2)"/></svg>
<span>with<span class="dot">.</span></span>
</a>
<nav class="nav-links" aria-label="Primary">
<a href="#why">Why With</a>
<a href="#start">Get started</a>
<a href="#code">Examples</a>
<a href="#wipe">Showcase</a>
<a href="#install">Install</a>
<a href="https://github.com/withlang-dev/with/blob/main/docs/with-specification.md" target="_blank" rel="noopener">Docs</a>
<a href="#founder">Founder</a>
</nav>
<div class="nav-right">
<div class="socials nav-socials">
<a href="https://github.com/withlang-dev/with" target="_blank" rel="noopener" aria-label="GitHub" title="GitHub"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a>
<a href="https://discord.gg/f7u2MRuPSa" target="_blank" rel="noopener" aria-label="Discord" title="Discord"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
<a href="https://www.reddit.com/r/withlang/" target="_blank" rel="noopener" aria-label="Reddit" title="Reddit"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z"/></svg></a>
<a href="https://x.com/QuixiAI" target="_blank" rel="noopener" aria-label="X (Twitter)" title="X (Twitter)"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"/></svg></a>
<a href="https://huggingface.co/QuixiAI" target="_blank" rel="noopener" aria-label="Hugging Face" title="Hugging Face"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378 0 1.112.178 2.181.503 3.185.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284.278.173.48.408.71.694.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542.01.026.653 1.552 1.657 2.54.616.605 1.01 1.223 1.082 1.912.055.537-.096 1.059-.38 1.572.637.121 1.294.187 1.967.187.657 0 1.298-.063 1.921-.178-.287-.517-.44-1.041-.384-1.581.07-.69.465-1.307 1.081-1.913 1.004-.987 1.647-2.513 1.657-2.539.021-.074.083-.285.233-.542.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952.23-.286.432-.52.71-.694.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174 1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013 1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164 1.607-.007 2.984-1.155 3.572-1.164.196-.003.305.12.305.454 0 .886-.424 2.328-1.563 3.202-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026-.01.008-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116 1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243 1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444-.034-.016-.104-.008-.2.022q-.094.03-.216.087-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096 3 3 0 0 0-.26.219 2 2 0 0 0-.12.121 2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203 0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647 2.822 2.813 2.562 3.244-1.176-.506-1.176-.506-2.866-2.567-3.49-1.898.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405-.238.839-2.71-1.587-3.216-.642-.506.946 3.49 2.056 3.522 2.064 1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194 1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647-2.822 2.813-2.562 3.244 1.176-.506 1.176-.506 2.866-2.567 3.49-1.898-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405.238.839 2.71-1.587 3.216-.642.506.946-3.49 2.056-3.522 2.064-1.29.33-4.568 1.028-5.713-.624"/></svg></a>
<a href="https://erichartford.com/the-with-programming-language" target="_blank" rel="noopener" aria-label="Blog post" title="Blog post"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0 1 16 16"/><circle cx="5" cy="19" r="1.4" fill="currentColor"/></svg></a>
</div>
<a href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwithlang.org%2F" target="_blank" rel="noopener" class="share-li nav-share" aria-label="Share on LinkedIn" title="Share on LinkedIn"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.71 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg><span>Share</span></a>
<a class="vpill" id="verpill" href="https://github.com/withlang-dev/with/releases/latest" target="_blank" rel="noopener"><span class="live"></span><span id="vertxt">v0.15.2</span></a>
<button class="icon-btn" id="theme" aria-label="Toggle theme" title="Toggle light / dark">
<svg id="theme-ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg>
</button>
<a class="btn btn-primary" href="#install">Get With</a>
<button class="icon-btn hamb" id="hamb" aria-label="Menu"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 7h16M4 12h16M4 17h16"/></svg></button>
</div>
</div>
<div class="mobile" id="mobile">
<a href="#why">Why With</a>
<a href="#start">Get started</a>
<a href="#code">Examples</a>
<a href="#wipe">Showcase</a>
<a href="#install">Install</a>
<a href="https://github.com/withlang-dev/with/blob/main/docs/with-specification.md" target="_blank" rel="noopener">Docs</a>
<a href="#founder">Founder</a>
<div class="socials">
<a href="https://github.com/withlang-dev/with" target="_blank" rel="noopener" aria-label="GitHub" title="GitHub"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a>
<a href="https://discord.gg/f7u2MRuPSa" target="_blank" rel="noopener" aria-label="Discord" title="Discord"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
<a href="https://www.reddit.com/r/withlang/" target="_blank" rel="noopener" aria-label="Reddit" title="Reddit"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z"/></svg></a>
<a href="https://x.com/QuixiAI" target="_blank" rel="noopener" aria-label="X (Twitter)" title="X (Twitter)"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"/></svg></a>
<a href="https://huggingface.co/QuixiAI" target="_blank" rel="noopener" aria-label="Hugging Face" title="Hugging Face"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378 0 1.112.178 2.181.503 3.185.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284.278.173.48.408.71.694.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542.01.026.653 1.552 1.657 2.54.616.605 1.01 1.223 1.082 1.912.055.537-.096 1.059-.38 1.572.637.121 1.294.187 1.967.187.657 0 1.298-.063 1.921-.178-.287-.517-.44-1.041-.384-1.581.07-.69.465-1.307 1.081-1.913 1.004-.987 1.647-2.513 1.657-2.539.021-.074.083-.285.233-.542.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952.23-.286.432-.52.71-.694.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174 1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013 1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164 1.607-.007 2.984-1.155 3.572-1.164.196-.003.305.12.305.454 0 .886-.424 2.328-1.563 3.202-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026-.01.008-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116 1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243 1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444-.034-.016-.104-.008-.2.022q-.094.03-.216.087-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096 3 3 0 0 0-.26.219 2 2 0 0 0-.12.121 2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203 0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647 2.822 2.813 2.562 3.244-1.176-.506-1.176-.506-2.866-2.567-3.49-1.898.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405-.238.839-2.71-1.587-3.216-.642-.506.946 3.49 2.056 3.522 2.064 1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194 1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647-2.822 2.813-2.562 3.244 1.176-.506 1.176-.506 2.866-2.567 3.49-1.898-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405.238.839 2.71-1.587 3.216-.642.506.946-3.49 2.056-3.522 2.064-1.29.33-4.568 1.028-5.713-.624"/></svg></a>
<a href="https://erichartford.com/the-with-programming-language" target="_blank" rel="noopener" aria-label="Blog post" title="Blog post"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0 1 16 16"/><circle cx="5" cy="19" r="1.4" fill="currentColor"/></svg></a>
<a href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwithlang.org%2F" target="_blank" rel="noopener" class="share-li" aria-label="Share on LinkedIn" title="Share on LinkedIn"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.71 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg><span>Share</span></a>
</div>
</div>
</header>
<main>
<!-- HERO -->
<section class="hero">
<div class="wrap">
<div class="hero-grid">
<div>
<span class="eyebrow">// close to the machine, without the suffering</span>
<h1>The systems language that <span class="grad-text">writes less</span> so it can prove more.</h1>
<p class="lede">With is native by default, exactly as safe as Rust, and allergic to ceremony. Every character the compiler can infer is a character you never type.</p>
<div class="hero-cta">
<a class="btn btn-primary" href="#install">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v12m0 0l-4-4m4 4l4-4M5 21h14"/></svg>
Install With
</a>
<a class="btn btn-ghost" href="https://github.com/withlang-dev/with" target="_blank" rel="noopener">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.58 2 12.25c0 4.53 2.87 8.37 6.84 9.73.5.1.68-.22.68-.49v-1.7c-2.78.62-3.37-1.22-3.37-1.22-.46-1.18-1.11-1.5-1.11-1.5-.9-.63.07-.62.07-.62 1 .07 1.53 1.05 1.53 1.05.9 1.57 2.34 1.12 2.91.85.09-.66.35-1.12.63-1.37-2.22-.26-4.56-1.14-4.56-5.06 0-1.12.39-2.03 1.03-2.75-.1-.26-.45-1.3.1-2.71 0 0 .84-.28 2.75 1.05a9.34 9.34 0 015 0c1.91-1.33 2.75-1.05 2.75-1.05.55 1.41.2 2.45.1 2.71.64.72 1.03 1.63 1.03 2.75 0 3.93-2.34 4.79-4.57 5.05.36.32.68.94.68 1.9v2.82c0 .27.18.6.69.49A10.02 10.02 0 0022 12.25C22 6.58 17.52 2 12 2z"/></svg>
View on GitHub
</a>
</div>
<div class="cmd" data-copy="curl -fsSL https://withlang.org/installer/install.sh | sh">
<span class="p">$</span>
<span class="t">curl -fsSL https://withlang.org/installer/install.sh | sh</span>
<button class="copy" aria-label="Copy install command">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</button>
</div>
<div class="subnote">Also on <code>macOS · Linux · Windows</code>. One binary. No system LLVM required.</div>
</div>
<figure class="demo reveal">
<video autoplay loop muted playsinline preload="metadata" poster="/assets/spiral-poster.jpg" width="876" height="866" aria-label="Terminal recording: with init, with get c.raylib, with run, and a native window opens drawing a colored spiral">
<source src="/assets/spiral.mp4" type="video/mp4">
<img src="/assets/spiral.gif" alt="Terminal recording of the With getting-started flow ending in a spiral window" width="876" height="866" loading="lazy">
</video>
<figcaption><span class="live"></span>Real time · empty folder to native window in 28s · <a href="#start">try it ↓</a></figcaption>
</figure>
</div>
</div>
</section>
<hr class="divider">
<!-- WHY -->
<section id="why">
<div class="wrap">
<div class="section-head reveal">
<div class="kick">Why With</div>
<h2>Native control. Rust-level safety. C-level reach.</h2>
<p>With pays compiler complexity so you don't pay it in ceremony — the guardrails stay, the boilerplate goes.</p>
</div>
<div class="window hello reveal">
<div class="win-bar"><span class="dots"><i></i><i></i><i></i></span><span class="win-name">hello.w</span></div>
<pre class="code"><span class="c">// the body makes the return type obvious, so it's inferred.</span>
<span class="k">fn</span> <span class="fn">shout</span>(s: <span class="t">str</span>): s <span class="op">++</span> <span class="s">"!"</span>
<span class="c">// main returns i32 to the OS — no trailing 0 needed.</span>
<span class="k">fn</span> <span class="fn">main</span>:
<span class="fn">print</span>(<span class="fn">shout</span>(<span class="s">"Hello, World"</span>))
</pre>
<div class="win-run"><span class="p">▸ with run hello.w</span> <span class="out">Hello, World!</span></div>
</div>
<div class="cards">
<div class="card reveal">
<div class="ic"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2L3 14h7l-1 8 10-12h-7l1-8z"/></svg></div>
<h3>No ceremony</h3>
<p>If the compiler can infer, import, bind, prove, or generate it, you don't spell it out. No <b>Ok(())</b>, no <b>let _ =</b>, no trailing return. <b>Every unnecessary character is a compiler failure.</b></p>
</div>
<div class="card reveal">
<div class="ic"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg></div>
<h3>Exactly as safe as Rust</h3>
<p>Single ownership, consuming destructors, generational references — the best of Vale. A resource lives in its scope and is released when the scope ends. <b>Leaking is a defect, not a convenience.</b></p>
</div>
<div class="card reveal">
<div class="ic"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17l6-6-6-6M12 19h8"/></svg></div>
<h3>C is first-class</h3>
<p>Point <b>c_import</b> at a header and call the library — no shim, no bindings, no becoming the build system. Raw C stays explicit; modeled C becomes humane. The migrator brings whole libraries across.</p>
</div>
</div>
</div>
</section>
<hr class="divider">
<!-- GETTING STARTED: SPIRAL -->
<section id="start">
<div class="wrap">
<div class="section-head reveal">
<div class="kick">Getting started</div>
<h2>From an empty folder to a native window — in three commands.</h2>
<p>With models C libraries for you. Fetch <b>raylib</b>, write a little math, and run a real, hardware-accelerated graphics program. No bindings, no CMake, no glue.</p>
</div>
<div class="start-steps reveal">
<div class="step"><div class="no">01</div><h4><code>with init spiral</code></h4><p>Scaffold a project: a manifest and <code>src/main.w</code>. Nothing else to configure.</p></div>
<div class="step"><div class="no">02</div><h4><code>with get c.raylib</code></h4><p>Fetch raylib, read its headers, model the C API, and link it — you get typed functions to call.</p></div>
<div class="step"><div class="no">03</div><h4><code>with run</code></h4><p>Compile to native and launch. A window opens with a living, colored spiral.</p></div>
</div>
<div class="start-grid">
<div class="term reveal">
<div class="win-bar"><span class="dots"><i></i><i></i><i></i></span><span class="win-name">terminal</span></div>
<pre><span class="p">$</span> with init spiral <span class="mut">&&</span> cd spiral
<span class="mut"> created</span> with.toml, src/main.w
<span class="p">$</span> with get c.raylib
<span class="ok"> ✓</span> fetched raylib · modeled the C API · linked
<span class="mut"># write the spiral into src/main.w →</span>
<span class="p">$</span> with check src/main.w
<span class="ok"> ok</span>
<span class="p">$</span> with run
<span class="ok"> ✓</span> native build · a window opens, spinning <span class="cur"></span>
</pre>
</div>
<div class="window reveal">
<div class="win-bar"><span class="dots"><i></i><i></i><i></i></span><span class="win-name">src/main.w</span></div>
<pre class="code"><span class="k">use</span> <span class="fn">c_import</span>(<span class="s">"raylib.h"</span>)
<span class="k">extern fn</span> <span class="fn">sin</span>(x: <span class="t">f64</span>) <span class="op">-></span> <span class="t">f64</span>
<span class="k">extern fn</span> <span class="fn">cos</span>(x: <span class="t">f64</span>) <span class="op">-></span> <span class="t">f64</span>
<span class="k">fn</span> <span class="fn">main</span>:
<span class="k">unsafe</span> { <span class="fn">InitWindow</span>(<span class="num">900</span>, <span class="num">600</span>, <span class="s">c"with · spiral"</span>.ptr) }
<span class="fn">SetTargetFPS</span>(<span class="num">60</span>)
<span class="k">var</span> t <span class="op">=</span> <span class="num">1.25</span>
<span class="k">while</span> <span class="k">not</span> <span class="fn">WindowShouldClose</span>():
<span class="fn">BeginDrawing</span>()
<span class="fn">ClearBackground</span>(<span class="t">Color</span> { r: <span class="num">14</span>, g: <span class="num">16</span>, b: <span class="num">26</span>, a: <span class="num">255</span> })
<span class="k">for</span> i <span class="k">in</span> <span class="num">0</span>..<span class="num">180</span>:
<span class="k">let</span> p <span class="op">=</span> i <span class="k">as</span> <span class="t">f64</span> <span class="op">/</span> <span class="num">180.0</span>
<span class="k">let</span> angle <span class="op">=</span> p <span class="op">*</span> <span class="num">18.85</span> <span class="op">+</span> t <span class="op">*</span> <span class="num">0.8</span>
<span class="k">let</span> radius <span class="op">=</span> <span class="num">28.0</span> <span class="op">+</span> p <span class="op">*</span> <span class="num">250.0</span> <span class="op">+</span> <span class="fn">sin</span>(t <span class="op">*</span> <span class="num">1.4</span> <span class="op">+</span> p <span class="op">*</span> <span class="num">6.0</span>) <span class="op">*</span> <span class="num">18.0</span>
<span class="k">let</span> x <span class="op">=</span> <span class="num">450.0</span> <span class="op">+</span> <span class="fn">cos</span>(angle) <span class="op">*</span> radius
<span class="k">let</span> y <span class="op">=</span> <span class="num">300.0</span> <span class="op">+</span> <span class="fn">sin</span>(angle) <span class="op">*</span> radius
<span class="k">let</span> hue <span class="op">=</span> (p <span class="op">*</span> <span class="num">360.0</span> <span class="op">+</span> t <span class="op">*</span> <span class="num">50.0</span>) <span class="k">as</span> <span class="t">f32</span>
<span class="fn">DrawCircle</span>(x <span class="k">as</span> <span class="t">i32</span>, y <span class="k">as</span> <span class="t">i32</span>, (<span class="num">4.0</span> <span class="op">+</span> p <span class="op">*</span> <span class="num">4.0</span>) <span class="k">as</span> <span class="t">f32</span>,
<span class="fn">ColorFromHSV</span>(hue, <span class="num">0.86</span> <span class="k">as</span> <span class="t">f32</span>, <span class="num">1.0</span> <span class="k">as</span> <span class="t">f32</span>))
<span class="fn">EndDrawing</span>()
t <span class="op">=</span> t <span class="op">+</span> <span class="num">0.02</span>
<span class="fn">CloseWindow</span>()
</pre>
</div>
</div>
<div class="start-note reveal">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><path d="M9 12l2 2 4-4"/></svg>
<div>This exact three-command flow is one of With's <b>release smoke tests</b> — it runs on every published build and renders the spiral to verify the pixels actually appear. The getting-started path can't quietly rot. <a href="https://github.com/withlang-dev/with/tree/main/build/release_uat_fixtures" target="_blank" rel="noopener">See the fixture →</a></div>
</div>
</div>
</section>
<!-- BUILT WITH WITH -->
<section id="wipe" aria-labelledby="wipe-title">
<div class="wrap">
<div class="wipe-intro">
<div class="section-head">
<div class="kick">Built with With</div>
<h2 id="wipe-title">WIPE<span>: SURVIVAL</span></h2>
<p>One arena. One hit. One more try.</p>
<ul class="wipe-tags" aria-label="Project details">
<li>With + raylib</li>
<li>Native desktop</li>
<li>Survival prototype</li>
</ul>
</div>
<div class="wipe-copy">
<p>A twin-stick survival game built in With. Dodge a relentless swarm, carve through luminous wireframes, and light up a reactive grid — all to a bass-led ambient house soundtrack.</p>
<a class="btn btn-primary" href="https://github.com/withlang-dev/wipe" target="_blank" rel="noopener">Explore WIPE on GitHub <span aria-hidden="true">→</span></a>
</div>
</div>
<figure class="wipe-film">
<video controls playsinline preload="none" poster="assets/wipe-poster.jpg" width="1114" height="720" aria-label="WIPE: SURVIVAL gameplay showcase" aria-describedby="wipe-caption">
<source src="assets/wipe-showcase.mp4" type="video/mp4">
<a href="assets/wipe-showcase.mp4">Watch the WIPE: SURVIVAL showcase video.</a>
</video>
<figcaption id="wipe-caption">
<span>25 seconds in the arena · gameplay capture</span>
<a href="assets/wipe-showcase.mp4">Open video <span aria-hidden="true">↗</span></a>
</figcaption>
</figure>
<div class="wipe-details">
<div>
<h3>Keep moving. Keep firing.</h3>
<p>Automatic fire, one-hit kills, and immediate retries. Move and aim with keyboard and mouse or a twin-stick controller.</p>
</div>
<div>
<h3>Arena meets atmosphere.</h3>
<p>Gaussian bloom, directional sparks, and a reactive grid turn every close call into a burst of light.</p>
</div>
<div>
<h3>Go from pixels to source.</h3>
<p>Explore the With simulation, rendering, shaders, and audio — then build and play it yourself.</p>
</div>
</div>
</div>
</section>
<!-- CODE SHOWCASE -->
<section id="code">
<div class="wrap">
<div class="section-head reveal">
<div class="kick">In the language</div>
<h2>Small on the page. Strict underneath.</h2>
<p>Every sample below compiles and runs on the current release.</p>
</div>
<div class="showcase">
<div class="tablist" role="tablist">
<button class="tab active" data-i="0"><div class="th"><span>Inference</span><span class="n">01</span></div><div class="td">Return types and locals the body already implies.</div></button>
<button class="tab" data-i="1"><div class="th"><span>Pattern matching</span><span class="n">02</span></div><div class="td">Match on tuples and values, exhaustively.</div></button>
<button class="tab" data-i="2"><div class="th"><span>C interop</span><span class="n">03</span></div><div class="td">Call a C library straight from its header.</div></button>
<button class="tab" data-i="3"><div class="th"><span>Ownership</span><span class="n">04</span></div><div class="td">Owned from creation, released by its scope.</div></button>
</div>
<div class="panels">
<div class="panel active">
<div class="window">
<div class="win-bar"><span class="dots"><i></i><i></i><i></i></span><span class="win-name">infer.w</span></div>
<pre class="code"><span class="c">// no `-> str`: the body makes the type obvious.</span>
<span class="k">fn</span> <span class="fn">shout</span>(s: <span class="t">str</span>): s <span class="op">++</span> <span class="s">"!"</span>
<span class="k">fn</span> <span class="fn">main</span>:
<span class="k">for</span> name <span class="k">in</span> [<span class="s">"ergonomic"</span>, <span class="s">"native"</span>, <span class="s">"safe"</span>]:
<span class="fn">print</span>(<span class="fn">shout</span>(name))
</pre>
<div class="win-run"><span class="p">▸</span> ergonomic! native! safe!</div>
</div>
</div>
<div class="panel">
<div class="window">
<div class="win-bar"><span class="dots"><i></i><i></i><i></i></span><span class="win-name">fizzbuzz.w</span></div>
<pre class="code"><span class="k">fn</span> <span class="fn">main</span>:
<span class="k">for</span> i <span class="k">in</span> <span class="num">1</span>..<span class="num">101</span>:
<span class="k">match</span> (i <span class="op">%</span> <span class="num">3</span>, i <span class="op">%</span> <span class="num">5</span>):
(<span class="num">0</span>, <span class="num">0</span>) <span class="op">=></span> <span class="fn">print</span>(<span class="s">"FizzBuzz"</span>)
(<span class="num">0</span>, _) <span class="op">=></span> <span class="fn">print</span>(<span class="s">"Fizz"</span>)
(_, <span class="num">0</span>) <span class="op">=></span> <span class="fn">print</span>(<span class="s">"Buzz"</span>)
_ <span class="op">=></span> <span class="fn">print</span>(i.<span class="fn">to_string</span>())
</pre>
<div class="win-run"><span class="p">▸</span> 1 2 Fizz 4 Buzz Fizz 7 ...</div>
</div>
</div>
<div class="panel">
<div class="window">
<div class="win-bar"><span class="dots"><i></i><i></i><i></i></span><span class="win-name">interop.w</span></div>
<pre class="code"><span class="k">use</span> <span class="fn">c_import</span>(<span class="s">"math.h"</span>)
<span class="k">fn</span> <span class="fn">main</span>:
<span class="k">let</span> r <span class="op">=</span> <span class="fn">sqrt</span>(<span class="num">2.0</span>) <span class="c">// C's sqrt, called directly</span>
<span class="fn">print</span>(<span class="s">f"sqrt(2) = {r}\n"</span>)
</pre>
<div class="win-run"><span class="p">▸ with run interop.w</span> <span class="out">sqrt(2) = 1.4142135623731</span></div>
</div>
</div>
<div class="panel">
<div class="window">
<div class="win-bar"><span class="dots"><i></i><i></i><i></i></span><span class="win-name">own.w</span></div>
<pre class="code"><span class="k">fn</span> <span class="fn">main</span>:
<span class="k">var</span> xs: <span class="t">Vec</span>[<span class="t">i32</span>] <span class="op">=</span> <span class="t">Vec</span>.<span class="fn">new</span>()
xs.<span class="fn">push</span>(<span class="num">2</span>); xs.<span class="fn">push</span>(<span class="num">3</span>); xs.<span class="fn">push</span>(<span class="num">4</span>)
<span class="k">var</span> total <span class="op">=</span> <span class="num">0</span>
<span class="k">for</span> i <span class="k">in</span> <span class="num">0</span>..xs.<span class="fn">len</span>() <span class="k">as</span> <span class="t">i32</span>:
total <span class="op">=</span> total <span class="op">+</span> xs[i]
<span class="c">// xs is freed here — its scope ends. No free() to forget.</span>
</pre>
<div class="win-run"><span class="p">▸</span> total = 9</div>
</div>
</div>
</div>
</div>
</div>
</section>
<hr class="divider">
<!-- INSTALL -->
<section id="install">
<div class="wrap">
<div class="section-head reveal">
<div class="kick">Install</div>
<h2>One command. One binary.</h2>
<p>The installer downloads a single self-contained compiler for your platform. The static LLVM toolchain is embedded — no system LLVM, no extra setup.</p>
</div>
<div class="install-tabs reveal">
<button class="itab active" data-os="unix">macOS & Linux</button>
<button class="itab" data-os="pwsh">Windows · PowerShell</button>
<button class="itab" data-os="cmd">Windows · cmd.exe</button>
</div>
<div class="install-grid">
<div>
<div class="ipanel active" data-os="unix">
<div class="big-cmd" data-copy="curl -fsSL https://withlang.org/installer/install.sh | sh">
<div class="top"><span>sh</span><button class="copy" aria-label="Copy"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg></button></div>
<pre><span class="p">$</span> curl -fsSL https://withlang.org/installer/install.sh | sh</pre>
</div>
</div>
<div class="ipanel" data-os="pwsh">
<div class="big-cmd" data-copy="irm https://withlang.org/installer/install.ps1 | iex">
<div class="top"><span>PowerShell</span><button class="copy" aria-label="Copy"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg></button></div>
<pre><span class="p">></span> irm https://withlang.org/installer/install.ps1 | iex</pre>
</div>
</div>
<div class="ipanel" data-os="cmd">
<div class="big-cmd" data-copy="curl.exe -L -o install.cmd https://withlang.org/installer/install.cmd && install.cmd">
<div class="top"><span>cmd.exe</span><button class="copy" aria-label="Copy"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg></button></div>
<pre><span class="p">></span> curl.exe -L -o install.cmd https://withlang.org/installer/install.cmd
<span class="p">></span> install.cmd</pre>
</div>
</div>
<p style="margin-top:16px;color:var(--faint);font-size:.9rem">Prefer to read first? Every installer is plain text — open
<a href="/installer/install.sh" style="color:var(--muted);border-bottom:1px solid var(--border2)">install.sh</a>,
<a href="/installer/install.ps1" style="color:var(--muted);border-bottom:1px solid var(--border2)">install.ps1</a>, or
<a href="/installer/install.cmd" style="color:var(--muted);border-bottom:1px solid var(--border2)">install.cmd</a> before you run it.</p>
</div>
<div class="notes reveal">
<h4>After it runs</h4>
<ul>
<li>The binary lands in <code>~/.local/bin</code> (or <code>%USERPROFILE%\.local\bin</code> on Windows). Add it to your <code>PATH</code> if it isn't already.</li>
<li>Choose another location with <code>WITH_INSTALL_DIR</code>, or pin a version with <code>WITH_VERSION</code>.</li>
<li>Then run your first program:</li>
</ul>
<div class="big-cmd" data-copy="with -e 'print("hello!")'"><div class="top"><span>try it</span><button class="copy" aria-label="Copy"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg></button></div><pre><span class="p">$</span> with -e 'print("hello!")'
hello!</pre></div>
<p style="margin-top:16px">Building from source or cross-compiling instead? See the
<a href="https://github.com/withlang-dev/with#readme" target="_blank" rel="noopener">README</a> and
<a href="https://github.com/withlang-dev/with/releases" target="_blank" rel="noopener">releases</a>.</p>
</div>
</div>
</div>
</section>
<hr class="divider">
<!-- FOUNDER -->
<section id="founder">
<div class="wrap">
<div class="section-head reveal">
<div class="kick">Founder</div>
<h2>Built by one engineer, in the open.</h2>
</div>
<div class="founder reveal">
<div class="photo-wrap"><img src="/assets/eric.jpg" alt="Eric Hartford" width="150" height="150" loading="lazy"></div>
<div>
<h3>Eric Hartford</h3>
<div class="role">Founder of With</div>
<p>Eric created With and writes its self-hosting compiler — the compiler that builds With is itself written in With. He is <b>Chief Scientist at Lazarus AI</b> and <b>Founder & CEO of Quixi AI</b>, and the creator of the <b>Dolphin</b> and <b>Samantha</b> open-weight model families, which have reached millions of downloads.</p>
<p>Before the current generation of AI work — dataset curation, full-parameter fine-tuning, alignment, evaluation, quantization, and deployment — he was a full-stack software engineer at Microsoft, AWS, eBay, and other technology companies. That span, from the model layer down to the systems layer, is where With comes from: a conviction that low-level control and human ergonomics are not a trade-off.</p>
<div class="links">
<a href="https://github.com/withlang-dev/with" target="_blank" rel="noopener">GitHub</a>
<a href="https://www.linkedin.com/in/ehartford" target="_blank" rel="noopener">LinkedIn</a>
<a href="https://huggingface.co/ehartford" target="_blank" rel="noopener">Hugging Face</a>
<a href="https://erichartford.com" target="_blank" rel="noopener">erichartford.com</a>
<a href="https://quixi.ai" target="_blank" rel="noopener">Quixi AI</a>
</div>
</div>
</div>
</div>
</section>
<!-- CTA -->
<section>
<div class="wrap">
<div class="cta reveal">
<h2>Write less. Prove more.</h2>
<p>Install the compiler, point <code style="font-family:var(--mono);color:var(--text)">c_import</code> at a header, and ship native code without the ceremony.</p>
<div class="btns">
<a class="btn btn-primary" href="#install">Get With</a>
<a class="btn btn-ghost" href="https://github.com/withlang-dev/with/blob/main/docs/mission.md" target="_blank" rel="noopener">Read the mission</a>
</div>
</div>
</div>
</section>
</main>
<footer>
<div class="wrap">
<div class="foot-grid">
<div class="foot-brand">
<a class="logo" href="/"><svg viewBox="0 0 64 64" aria-hidden="true"><path d="M14 22 L21 44 L28 28 L35 44 L42 22" fill="none" stroke="var(--accent)" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/><circle cx="48" cy="42" r="3.5" fill="var(--accent2)"/></svg><span>with<span class="dot">.</span></span></a>
<p>An ergonomics-first systems language. Close to the machine, exactly as safe as Rust, built to remove the suffering.</p>
<div class="socials">
<a href="https://github.com/withlang-dev/with" target="_blank" rel="noopener" aria-label="GitHub" title="GitHub"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a>
<a href="https://discord.gg/f7u2MRuPSa" target="_blank" rel="noopener" aria-label="Discord" title="Discord"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg></a>
<a href="https://www.reddit.com/r/withlang/" target="_blank" rel="noopener" aria-label="Reddit" title="Reddit"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z"/></svg></a>
<a href="https://x.com/QuixiAI" target="_blank" rel="noopener" aria-label="X (Twitter)" title="X (Twitter)"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"/></svg></a>
<a href="https://huggingface.co/QuixiAI" target="_blank" rel="noopener" aria-label="Hugging Face" title="Hugging Face"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378 0 1.112.178 2.181.503 3.185.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284.278.173.48.408.71.694.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542.01.026.653 1.552 1.657 2.54.616.605 1.01 1.223 1.082 1.912.055.537-.096 1.059-.38 1.572.637.121 1.294.187 1.967.187.657 0 1.298-.063 1.921-.178-.287-.517-.44-1.041-.384-1.581.07-.69.465-1.307 1.081-1.913 1.004-.987 1.647-2.513 1.657-2.539.021-.074.083-.285.233-.542.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952.23-.286.432-.52.71-.694.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174 1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013 1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164 1.607-.007 2.984-1.155 3.572-1.164.196-.003.305.12.305.454 0 .886-.424 2.328-1.563 3.202-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026-.01.008-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116 1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243 1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444-.034-.016-.104-.008-.2.022q-.094.03-.216.087-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096 3 3 0 0 0-.26.219 2 2 0 0 0-.12.121 2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203 0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647 2.822 2.813 2.562 3.244-1.176-.506-1.176-.506-2.866-2.567-3.49-1.898.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405-.238.839-2.71-1.587-3.216-.642-.506.946 3.49 2.056 3.522 2.064 1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194 1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647-2.822 2.813-2.562 3.244 1.176-.506 1.176-.506 2.866-2.567 3.49-1.898-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405.238.839 2.71-1.587 3.216-.642.506.946-3.49 2.056-3.522 2.064-1.29.33-4.568 1.028-5.713-.624"/></svg></a>
<a href="https://erichartford.com/the-with-programming-language" target="_blank" rel="noopener" aria-label="Blog post" title="Blog post"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0 1 16 16"/><circle cx="5" cy="19" r="1.4" fill="currentColor"/></svg></a>
<a href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwithlang.org%2F" target="_blank" rel="noopener" class="share-li" aria-label="Share on LinkedIn" title="Share on LinkedIn"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.71 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg><span>Share</span></a>
</div>
</div>
<div class="foot-col">
<h5>Learn</h5>
<a href="https://github.com/withlang-dev/with/blob/main/docs/with-specification.md" target="_blank" rel="noopener">Specification</a>
<a href="https://github.com/withlang-dev/with#readme" target="_blank" rel="noopener">README</a>
<a href="https://github.com/withlang-dev/with/tree/main/examples" target="_blank" rel="noopener">Examples</a>
<a href="https://github.com/withlang-dev/with/blob/main/docs/mission.md" target="_blank" rel="noopener">Mission</a>
</div>
<div class="foot-col">
<h5>Project</h5>
<a href="https://github.com/withlang-dev/with" target="_blank" rel="noopener">GitHub</a>
<a href="https://github.com/withlang-dev/with/issues" target="_blank" rel="noopener">Issues</a>
<a href="https://github.com/withlang-dev/with/releases" target="_blank" rel="noopener">Releases</a>
<a href="/installer/install.sh">Install script</a>
</div>
<div class="foot-col">
<h5>Founder</h5>
<a href="https://erichartford.com" target="_blank" rel="noopener">Eric Hartford</a>
<a href="https://www.linkedin.com/in/ehartford" target="_blank" rel="noopener">LinkedIn</a>
<a href="https://huggingface.co/ehartford" target="_blank" rel="noopener">Hugging Face</a>
<a href="https://quixi.ai" target="_blank" rel="noopener">Quixi AI</a>
</div>
</div>
<div class="foot-bottom">
<span>© 2026 With · created by Eric Hartford</span>
<span class="mono">the compiler is written in With</span>
</div>
</div>
</footer>
<script>
(function(){
// theme
var root=document.documentElement, tkey="with-theme";
var saved=localStorage.getItem(tkey);
if(saved) root.setAttribute("data-theme",saved);
else if(window.matchMedia && matchMedia("(prefers-color-scheme: light)").matches) root.setAttribute("data-theme","light");
document.getElementById("theme").addEventListener("click",function(){
var next=root.getAttribute("data-theme")==="light"?"dark":"light";
root.setAttribute("data-theme",next);
try{localStorage.setItem(tkey,next);}catch(e){}
});
// mobile menu
var hamb=document.getElementById("hamb"), mob=document.getElementById("mobile");
hamb && hamb.addEventListener("click",function(){mob.classList.toggle("open");});
mob && mob.querySelectorAll("a").forEach(function(a){a.addEventListener("click",function(){mob.classList.remove("open");});});
// copy buttons
document.querySelectorAll("[data-copy]").forEach(function(el){
var btn=el.querySelector(".copy"); if(!btn) return;
btn.addEventListener("click",function(e){
e.preventDefault();
var txt=el.getAttribute("data-copy");
navigator.clipboard && navigator.clipboard.writeText(txt).then(function(){
btn.classList.add("ok");
var old=btn.innerHTML;
btn.innerHTML='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></svg>';
setTimeout(function(){btn.classList.remove("ok");btn.innerHTML=old;},1400);
});
});
});
// code showcase tabs
var tabs=document.querySelectorAll(".tab"), panels=document.querySelectorAll(".panel");
tabs.forEach(function(t){t.addEventListener("click",function(){
var i=+t.getAttribute("data-i");
tabs.forEach(function(x){x.classList.remove("active");});
panels.forEach(function(x){x.classList.remove("active");});
t.classList.add("active"); panels[i].classList.add("active");
});});
// install tabs
var itabs=document.querySelectorAll(".itab"), ipanels=document.querySelectorAll(".ipanel");
itabs.forEach(function(t){t.addEventListener("click",function(){
var os=t.getAttribute("data-os");
itabs.forEach(function(x){x.classList.remove("active");});
ipanels.forEach(function(x){x.classList.toggle("active",x.getAttribute("data-os")===os);});
t.classList.add("active");
});});
// pick default install tab by platform
(function(){var p=navigator.platform||"";var os= /Win/i.test(p)?"pwsh":"unix";
if(os!=="unix"){document.querySelectorAll(".itab").forEach(function(t){if(t.getAttribute("data-os")===os)t.click();});}})();
// reveal on scroll
var io=new IntersectionObserver(function(es){es.forEach(function(e){if(e.isIntersecting){e.target.classList.add("in");io.unobserve(e.target);}});},{threshold:.12});
document.querySelectorAll(".reveal").forEach(function(el){io.observe(el);});
// live version pill (best-effort; static fallback stays if the call fails)
fetch("https://api.github.com/repos/withlang-dev/with/releases/latest",{headers:{Accept:"application/vnd.github+json"}})
.then(function(r){return r.ok?r.json():null;})
.then(function(j){if(j&&j.tag_name){document.getElementById("vertxt").textContent=j.tag_name;}})
.catch(function(){});
})();
</script>
</body>
</html>