summaryrefslogtreecommitdiffstats
path: root/2024
diff options
context:
space:
mode:
authorAleteoryx <alyx@aleteoryx.me>2024-12-03 00:12:57 -0500
committerAleteoryx <alyx@aleteoryx.me>2024-12-03 00:15:25 -0500
commit735b9fdf4535be1d721c59077e66def8b115d2ae (patch)
tree7b4dd4abf38151b247eb6c0004cf14aeb658ae96 /2024
parent656179e07857277c2e63789157e7b948f2c80114 (diff)
downloadadventofcode-735b9fdf4535be1d721c59077e66def8b115d2ae.tar.gz
adventofcode-735b9fdf4535be1d721c59077e66def8b115d2ae.tar.bz2
adventofcode-735b9fdf4535be1d721c59077e66def8b115d2ae.zip
2024.3
Diffstat (limited to '2024')
-rwxr-xr-x2024/tcl/03.tcl36
-rw-r--r--2024/tcl/input.03.txt6
-rwxr-xr-x2024/tcl/templ.tcl18
3 files changed, 60 insertions, 0 deletions
diff --git a/2024/tcl/03.tcl b/2024/tcl/03.tcl
new file mode 100755
index 0000000..d1ff7c9
--- /dev/null
+++ b/2024/tcl/03.tcl
@@ -0,0 +1,36 @@
+#!/bin/env tclsh
+
+source lib.tcl
+setup 3
+
+puts {Part 1: Sum of mul(x,y) calls...}
+
+set mulsum 0
+set mulsum_cf 0
+set cf 1
+foreach {inst a b} [regexp -all -inline {do\(\)|don't\(\)|mul\((\d+),(\d+)\)} [read $input]] {
+ switch -- [string range $inst 0 2] {
+ mul {
+ set inc [expr {$a * $b}]
+ incr mulsum $inc
+ if $cf {
+ incr mulsum_cf $inc
+ }
+ }
+ do( {
+ set cf 1
+ }
+ don {
+ set cf 0
+ }
+ }
+}
+
+close $input
+
+puts "Sum: $mulsum"
+
+puts ""
+puts {Part 2: ...with control flow.}
+
+puts "Sum: $mulsum_cf"
diff --git a/2024/tcl/input.03.txt b/2024/tcl/input.03.txt
new file mode 100644
index 0000000..1da07fc
--- /dev/null
+++ b/2024/tcl/input.03.txt
@@ -0,0 +1,6 @@
+from()]mul(317,745)-+?;what()&{mul(67,323)select()~(+/}what()<mul(304,399)&*&~<how()mul(268,613)how()?+from()from()don't()>+when()[who()@))why()mul(41,576)?!*why()}{who()@%;mul(335,137)how()<how()when()]how()do()when()%?what(),-mul(9,214)#()do()}when()when(764,50)( mul(416,854)who()~&from(291,845)mul(361,538)<}{%,mul(391,113)where()mul(9,629)from()(why(),who()&when()mul(853,523)how()mul(771,533)[mul(39,273)mul(627,522)]>{mul(729,375)?mul(714,984)mul(86,727)[mul(148,442))@,) mul(659,930)why())/@'-select()$don't(){from()/mul(606,455)from()#select()(,when(560,861)from()mul(661,278)@@where(714,248)-) ;how()don't()+#}mul(511,224)[ <,*!,how()[mul(741,103)@ ,-;don't()?mul(405,226)~;mul(690,221)>when();~*][($mul(743,671)$,,!mul(904,48){?{,[<,when()how()mul(214,669){<*<%mul(313,778)<*>%]:~)&mul(328,558)from()why()^:][^)don't()/%/ mul(16,534)where(62,792)^}',do()$ ~&mul(591,671)why()?how()what()mul(158,309):!mul(305,375)+{from()#from()~mul(395,733){$]#,)how()/~who()mul(764,920)+mul(787,366)(&what()>who()~mul(260,940)$why()/,mul(904,953) >$mul(803,943)#@+how()what()mul(97,179)$ )[!:^::&mul(757,133) mul(949,638)/]: /when()mul(533,324)mul(177,653)[&mul(361,108)(,[mul(912,339)[#what()</;>from()why()#don't()mul(130,4)<&what()^when()^-@]!mul(501,376)!(#~when()*'~mul(166,904)how()~mul(229,929)mul(481,574)select(),- {?@how() ?mul(989,487)where()who(),don't()/:@-[mul(398,359)when()what(440,393)}mul(110,756)who()how()!select()%[what()mul(300,194)}don't()-%who()>$^<mul(87,414)$,how(),<; mul(551,403)select()%&'<]#*{*mul(92,391){>mul(598,480):'how()()#[/~;mul(644,80)%<@(select();mul(254,510)!~]{-!mul(432,50)&@;&from(442,218)mul(128,797)&where()}#mul(210,512)select())mul(22,316)~where()/#mul(228,533)@@?who()<mul(912,39)@%[ $-mul(808,845)#[^(what()$&%who()do()>,])mul(444,403)why())why(161,374)@:mul(420,83))when()* :>]]%[mul(738,977)/)when()<;do()how()%why()]},}mul(739,424)mul(21,79)(how(964,229)$-mul(886,756)^mul(959]+mul(510,621){/$ %from(535,780)<mul(92,339)select()~mul(827,684)#~why()&!!select()mul(249,131)when(916,959)+)mul(106,569)$/%where()~},mul(998,733)when()});mul(653,299)select()why()?![#>mul(942,849)#;who()select()(mul(884,418)?#}from()}-do()-mul(765,279)!how()~ select()how()mul(230,66)+#>+]}/[why()mul(830,643)]why(),@-+mul(549,381)+-}>)}[,>[mul(384,650)select())+:mul(156,98)?select(265,152)$mul(848,696)(*(}>-what()mul(916,489)<:*~when()why()[>mul(795,164)when():?mul(681,258)#mul(548,602)why()how()({from(791,741)<(]<mul(961,356)%select()?from()mul(648,723),do(),@why()$,)'how()who(397,536)what()mul(467,182)<mul(619,371)%^;[~why(201,122),don't()%:&where()'}<what()from()mul(437,812),when()&&;} ^/mul(46,936)when(){~what() )mul(365,654)^[mul(870,487)why()$$+select()don't();what()?-%mul(467,737);when()mul(83,429)<when()>why()@<^,where()(mul(325,852)$from()$~when())mul(354,858)}/[@mul(452,532)mulwhen()&[mul(496,103)mul(670,785)how(776,494)-{&<?mul(159,685)/where()why()mul(554,566)who()don't()*~?mul(795,238)when(189,263)#how()^select()who() }<-mul(127,756),&!when()?)mul(521,571);%*mul(124,683)
+$mul(357,188)#;*&mul(6,813)<>!select()~who()?%>&mul(59,896),mul(323,734)~:-:<,mul(930,720)>{~mul(55,98)how()from()@where()<?:mul(244,409){(}/&{@'mul(922,927)when(404,104)(@%mul(793,824)><>where():-;]?>do()>(when()select()&(:'select()-mul(519,249)when()where():*,#what()when()</do()]/[from()<how()where()?mul(455,538)mul(8,75)select()mul(384,870)mul(198,350)?*{-where()!mul(701,295))who()!who()(from()mul(916,723)&what(660,202)mul(894,861) )select()?+(mul(110,94)+'+from()@{,what()%mul(957,484)when()from()how():>mul(433,688)$'{/&-;^;mul(487,902)<from()-[/mul(328,56)],mul(102,883)from()mul(401,90)mul(899,387)})(($do()select()%<@%who(317,347)who()mul(252,59)^)-$mul(128,621)~}[from()>?' 'mul(851,22)mul(571,264)[)mul(625,196why(),/%]<what()>mul(177,329)when()(what()]select()>%&mul(392,746)?!when(855,314)&-+}[^mul(244,411)~ what()*from()mul(27,419)from() &}mul(783,31)!mul(609,220)>#^!mul(835<where()^,who()?~@(who())mul(714,10)$&';#/how()!mul(17,600)& mul(598,355)$mul(847,922):%when()what()<,{from()(mul(817,245)how(14,634)how())why()select(485,850)!,who()from()mul(247,41)*mul(446,532)++!*()@mul(274,661) mul(199,612)':mul(646,864why()<from()~@<who(461,500)mul(782,547)(?:mul(743,582),<^who(){,]who()'mul(850,546)~why()@<mul(488,315)/!how(355,748)'mul(372,470)who()+)what()^*from()#:@mul(290,938)&?where()(#who()what()mul(324,916<{(<mul(477,756)#)why()how(642,558)mul(446,370))! what()>'*mul(26,372)-mul(968,770)who()why()]%from()}what() ><mul(970,795)^mul(342,394)where():*what()*where()<select(181,857) mul(919,739))who()//]mul(581,716)}where()&*+@mul(236,735)mul(834,735)?(mul(184,982)?^{-where()select();+mul(112,966){%*mul{mul(589,380)[/%>mul(258,240)$mul(767&]mul(255,639)-&why()mul(682,513)][+!@@,{mul(267,914)#'who()+what()do()~)~%];mul(328,10)[$how()}+!<>-mul(286,443,; ;!(how()! do()what()+<(:mul(734,165)how(){:{]#]from(543,898)-mul(311:when()%mul(955,663)&*~>~;{mul(87,123)***mul(273,650)[mul(288,699)how()'& {'%from(){why()mul(677,973)({{>$!mul(962,447)~why()where();mul(193,727)^} '#;))select()mul(332,420)where()who()}%what()?mul(946,222)#)~/where()how()who() mul(784,547) }select()<mul(381,666)who()when()$mul(89,958)select(),[{?from()how()select()>mul(868,939)how()-) when()/mul(766,690)$/(how():mul(289,854){what(){:-from()%{'$mul(616,797);!how()'mul(607,52),mul(634,542)/ ){how()])select(269,907)mul(746,163)])+&& >:where()mul(933,745)<])*select()#;do():+from()/';@:mul(549,673):where()!where(),*[who() *mul(182,300)++&how(14,499)from()[]&mul(674,397)why()from()mul(274,670)/-^/how()%-why()mul(631,257);~}$don't()$where()}#%select()(mul(222,921)select(875,756)+-why()[)+}why())mul(527,536)^*#@*mul(526,226)!mul(509,930)$who()when()/+)when(342,782)~mul(806,222)(],why()where()^mul(528,285)^#?#what()mul(875,506)from()^mul(537,399)/&?{mul(457,240)%^mul(16,257),}%%+?#>mul(780,949)}mul(570,933)when(749,935){mul(708,407)/mul(475,875)mul(124,766)'?where(308,370); '&mul(397,320){>'where()how()mul(558,514)}>#},mul(164who()why():;when()select()(mul(553,336)how()what()]who()why()select()mul(295,32)&from():^?mul(233,116)~]mul(429,202)when()what()select()mul(741,965)*{&#;#$,/how()mul(367,887)
+mul(681,506) -^mul(484,363)@:when();where()from()select();mul(186,965)who()from()~who(442,513)who()-&*];mul(116,362)[~where()(where()!/^:mul(733,863):}'when()]^<mul(360,605){<-mul(153,449)?do()!/@ mul(844,294) what(186,887)<[{mul(107select()$from()how()[mul(543,754)+how()>+;mul(75,849)mul(115,784#:@why()%from()'$@mul(592,93)select(773,179){[['>from()}mul(131,959)@who()]mul(394,818)$-(+'^^mul(996,181)select()<> #~*+*mul(53,343) where()when()!mul(954,569)**[don't()+what():%)$-why()#mul(452,447)*{mul(264,795)}how()#when()#from()why()when(745,720)mul(248,687): ^^,<+[when(889,956):mul(937,8)how(235,664)?]<mul(411,878)do()where(410,825)mul(344,530)mul(217,715)[what()>?{mul(137,328)?mul(503,926%mul(13,847))mul?why()?select()()mul(460,750)]%;mul(651,280)why()>>,how()when()$? mul(133,236)!<(what()^>'?^mul(748,823)who()where()mul(43,496)select()when()++why()';?mul(875,70)-when(402,701)&)why()'mul(982,841)>^do()>who()where()/]:mul(647,595);select(), ::mul how()where()select()from()&(/+mul(468,107)what()how()#what()>;]mul(957,478)where():?mul>when()%{where()?%mul(592,367)mul,why()mul(72,238)who()?:+<(mul(222,516)%]%#~mul(193,251)when()when())/why()@)@/mul(340,791)&/?who()why(){&,?mul(55,804)']{&%$/mul(316,546)when()who()mul(971,888)[mul(103,609)]*>)<[;~/what()mul(490,677)why(898,282)mul(170,318)*how():>&^)-<mul(33,396)mul(773,821)mul(385,170)'*mul(711,538) ,who(),$who()mul(299,334)how()>where()from()#,when()mul(372,78)>?*select()from()!&]why()mul(449,613)'select()!'do()'<*mul(761,836)what(){!(who()why(634,576)mul(802,819)]/+who(){} select()$mul(203,130)<'mul(400,590)'mul(951,874)where()mul(186,662)who()[who():;@;mul(192,643)$'why()[:?don't()&(-select()!;*?mul(517where()#mul(484,952)/&[};<,mul(191,767who()'{:why()how()from()}mul(391,241)]mul(564,815)!@,~mul(327,855)mul(515,532)*([>{:don't()when()% mul(399,207)@->mul(176,348)why()what()mul(517,732)]:,mul(832,279)what()?*-<+>mul(158,912):@!^-!mul(630,685)(/*what()}from()@#!mul(737,751)'/$how()from()mul(952,556)what()~~},:,don't()[(how())^<mul(210,790)who()]-why()$(#{%don't()@who()who()]&why())mul(354,496)&where()!,who(),(-/mul(440,931)?@-}^'mul(17,442)?[;(^select()#when()-@mul(42,62)@{*<from()mul(430,397))@-{who()mul(628,588)where()}]mul(397,569)%%()how()*mul(326,493)}mul(693,740)$+mul(594,353)>/why()why()when()mul(464,363)@select()? when()where()mul(380,587)mul(935@<;mul(311,283)-,+{>;&;~mul(217,900)from()when()){%@{+<~mul(861,412){mul(649,279)when()!->{mul(53,704)}>mul(124,780)(}^@]from(){where()#mul(323,768)]what():/'':select()mul(42,323)!select(),$mul(833,631)where(920,91));?select()mul(274,3)-]^^*~{/<mul(196,426)+,@how()mul(616,917)!@'#'mul(692,551)<what()(who()~-,mulselect()<select()how())^what()!mul(781,9)how():)when()@what(){}%mul(548,666)how(652,886)select()mul(870,348)mul(682,319)[]'~?how()}<,?mul(793,214) &how()%mul(335,779)don't()where():mul(211,616)who(){!mul(35,366)who()select()when()^}from()}((mul(789,133)from(617,415)when(557,309)#%<-<;^mul(239,465){)]+~)]select()<mul(245,794)#}+@$><where()mul(156,376)select()<select()~;mul(663,995^what()!~:mul(536,993):when()[+:*when():>mul(195,31)~}#select()+[ why()mul(437,871)how()#where()$? what(265,149)[mul(53,447)@<-mul(182,3)}>#!/usr/bin/perlmul(836,288)
+&/where(234,114)mul(230,255)(;{~*where()/+from())do()how(174,635)where()(>~(mul(547,383)how()(]( mul(394#when(217,999)[mul(520,655)@/} mul(883,280)(from()+#mul(993,6)@%,@}'*-mul(469,993)*})mul(329,69);<}}mul(94,7):{'mul(299,57)->where()who()><<@}mul(192,320);-< (mul(348,932)(+mul(565,629)/how(792,174)mul(994,456),&from()when()from()from()$select(){+mul(518,910)where()$mul(42,710)mul(447,192)what(); &mul(535,494)@&mul(39,121~where()>]@who()$mul(238,165)}{&how():)mul(293,498)@^ why(231,662)mul(91,213))@who()*when()mul(547,308):~~^how(179,495)(where()mul(334,412),!}}?,*what()mul(704,941)}:]^mul(215,465){~&!*@{where(719,643):[mul(653,594)who(){;-{}mul(307,823)^(?{><}+@mul^<]?,who()?mul(989,866)}when(881,287){)-who()::who()mul(642,431)@-mul(817,550)from()>'(when();!%&mul(315,78)%select()mulwhen()~(why()]mul(636,929)when()%->mul(53,720'](;!$mul(931,769)(<where()*%mul(564,758)when()^how()&/what()?mul(157,808)[$select()!mul(45,300{:}#*mul(489,460)/>---+[*>don't()+&when(88,906)*$where(),@mul(223,251)#]'<+,%mul(146,115)how()]mul(136,688),mul(222,174)#]mul(75,636)^who()mul(76,992]mul(280,202)]select()!>,when()when()#mul(68,678),:$$select()?why(302,488)>#what()mul(923,779)who())]>]mul(525,656)'%#mul(110,925)from()]$?>why()what()mul(485,123)?where()'!(@)/?%mul(62,61)#who()don't()'from()who()mul(863,433)])what()<{'[>{where()mul(955,358)+select()what()*from()from()how()mul(674,255)how():who()/[when()+mul(672,815)/{}mul(814,989)mul(522,617)][why();mul(938,866)?'mul(721,230),!how() %$^{^'mul(89,252)@how()!--what()@what()mul(66,916,;select()<?:^select())'mul(531,968)[mul(280,752)?~@select()%)*[mul(233,540)why(556,178)from()how()-&*who()# mul(430,556)+why()-who()[}where() {mul(672,946){where(),$?<]?mul(658,406)when()how()mul(610,27)how(50,274)^why()mul(715{?mul(629,127)how()mul(393,509)how()mul(244,232)-}-*where() '+mul(942/@$select()mul(597,258)mul(678,779)%/mul(51,384)how(966,527):?(where()mul(568,950)'mul(649,193)why():^* ^select():@mul(986,822)!!(]#!:what()how()from()mul(726,454)>@from()>[mul(908,102)$how()[how()}/:mul(352,260):?where()how(418,410)<@*~why(){mul(288,873)^'}${+{when()select()mul(577,817);!<+)%#mul(398,599)?mul(410,933)![;<why() mul(279,459))&{[ )how()who()mul/+how()$mul(917,597)::who()mul(203,658)--}*-/%[why()mul(39,722)&[^! )]mul(257,675)],where()mul(486,610)!mul(681,289)[mul(526,525)((;-when()/-mul(339,901)<>~[(mul(372,736)-{^who(284,999);>$don't()~where()mul(946,342)',* >when()'from()~don't()>mul(48,678),-how()where()mul(521,176)*]mul(653,286)[what()';mul(527,517) :'%do()'how()when()why(638,246)~*&'mul(817,515)when():)^&;mul(902,760)when()who()+from() !<who()who()select()mul(167,985)-when()mul(331,88)$select()how()#~~'!(select()don't()mul(23,61)! %)['&why()(<mul(106,417)why()#+~mul(166,868)!!%why(167,196)^&select()when()what()mul(272,714)%why(780,432)>&)/;mul(490,93)when()mul(999,859)?'mul(23,41) !where():>--']mul(529^who(824,944))/where(){mul(730,713)}~&**where()mul(783,314)when()![%@mul(192,618)mul(639,668)+from())&who()%*<mul(630,581)]<where() '/who()'[&mul(404,388)#}mul(224,332);mul(6,832)~/+/mul(926,474)[mul(90,847):^mul(296,717) how()[&why(),mul(185,325when()$mul(514,3)
+what()#<^:,>~ 'don't()*$from()-!when()]from()mul(176,706)< -#mul(985,33)$/,']mul(166,740)mul$)>!%]^-[mul(741,253),select()<who()!select()$ #from()don't();$+<where()^,mul(971,878){<[%how()'(<(}mul(117,423)?where()select()why()mul(281,153)-$'what()what()((why() mul(3,154)select()#?),mul(751,705)'mul(178,539))@&@-,how(),: mul(417,145)what()[mul(232,236)+why()~&%][*>*mul(994,973){+$%%what(970,247)%#mul(569,793),where()$][-?&<why()mul(140,567)who()<,mul(588,988),>#:,mul(795,367)from()/<what()!%?mul[:@{'^from()~mul(569,761)(]how()mul(154,643)!,~)where()mul(45,525)}select()where()mul(389,232)where()~how()}<!when()>~)mul(184,867)}where()when()^(mul(11,847)&mul(252,382)&how()what()*where()mul(42,377))select(451,494):^}*mul(519,853(]mul(645,935)[*,]-&]select()mul(205,327) ])<?^;?mul(300,9)$;[)]@don't()]!,[mul(776,827)!who()!how() @<}^(mul(373,554)mul(524,356)mul(392,386) mul(212,201)@why();{do()?where()where()who()+$;when()*mul(920,896how()from()#/from()-:where()mul(913,288)'who()mul(566,628)where()}mul(576,731 mul(980,849)^, ~from()$[#]why()mul(773,966)$#<when()&+}(don't()~~}@<mul(435,372)]+{]!?mul(387,749)#)select()<mul(282,885)<??select()%why():,;mul(345,395)$#^#{+[<#'mul(91,797@%who();'mul(72,973)/>,*)mul(411,698);^[[who(212,491)& -,mul(83,917):how()select()%((+&@mul(86,812)!%how()mul(555,734)(!#select()*'where()from()how()mul(815,589);~-^where()-select()mul(981,251)why()@what()]@*do(){what(874,233)mul(74<)'%[ )mul(461,683);]why()who()(when()*%-{mul(927,403)@/@~where(584,953)--mul(766,900)select()@['+:{)when()mul(919,825)mul(762,132),>%~from(364,888){who() )mul(783,336)where()~$?; ?!don't()mul(275,278)}what()mul(167,505)*^',;^from()mul(692,244)#'^>mul(835,721)!~what()',@mul(447,777){[from(133,514)what()mul(642,217)'(from()@/'how()<^{mul(831,368)@! what()why(434,98)@ don't() who()$]mul(40,963)mul(130,643))what()/select()mul(211,425)${mul(443,261)select()-<^ select()]where()!don't()}#!,where()how()mul(862,985) ,^!how()@don't()!:(what()mul(981,127)~'from()-mul(871,89) :]when()mul(467,236)mul(606,18)+!$:(mul(753<]who()<select()& why()[mul(362,678)when();%-when()%+mul(579,491)-select()mul(610,541)~, mul(133,986)+;$:<]@mul(274,806)[<how(375,901)@}mul(387,423)% #{mul(348,222)how()}select()why()>{[how()from()#mul(986,891)#:when()mul(519,399)who()))#*mul(545,827)mul(638,830){select()mul(466,624) :)when() #mul(254,927)<who(306,639)^mul(5,701)how(){$]?where()select()?)mul(421,47)what()$@}?{@mul(997,349)},]mul(850,804),;<from()from()<what()?mul(956,400)who()mul(284,863)!'+from()select()mul(330,812)>&what()where()why()}}#mul(827,465)};]what()>why()mul(242,606):';-/mul(404,75)mul(221,314)who()@who()*[select()>%mul(414,100)!what();why()~what():$ why()mul(315,402)]don't()!where()},from()#how():mul(286,647)+what()+why()%*!^when()-mul(902,822)when()><!}-when()mul(471,137why()]mul(322,382)@<where(486,83)$!#mul(750@[)what()^mul(625,615)mulwho()mul(609,178)$)-don't() ^why()how(60,419)%who()mul(937,33)~how()how()from()?-&who()>why()mul(7,343)select()where();},>&why()?&mul(564,706)()!*how(),why()>{mul(369,110)>,#mul(663,681*~@,@how()$mul(340,519)&)when()from()mul(590,642)*(/>'%$'where())mul(992,803)how()when()mul(863,400)@~from()>mul(708,294)>?@what())#$&mul(235,189)/~%-+)+&!~don't()>where()when())?mul(289,183)+$select()how()mul(597,749)why()mul(891,949)?mul(114,531) %+/,$from(493,501)-&^mul(591,30)}<@<[?;mul(91,804)
+^%mul(449,407))mul(731,490)#+)(why()?:when()mul(666,844)mul* select()who()mul(930,953)+~@^-mul(739,539)@who()]?& when() mul(989,203)(:)?];where()$mul(862,477)mul(861,661)%~%~/!mul(224,714)[ mul(737,853,^from() mul(212,888)>mul(185,546);#'}%why(292,59)mul(428,503)where()#>from()>;mul(47,787)/,select()<;>?]where()mul(781,376){select()-}>mul(193,943)how(),how()-)from()$+-mul^^%#$from()>how()*why()%mul(760,582)mul(702,579)+:mul(640,791)what(47,178) &!^who()how()mul(649,839)/!^/why()mul(590,380)select()why()< >where()< mul(59,685)<+'when()#/select()!:mul(926,631)who()>how()<select(){mul(620,690);mul(344,476)@ when()what():&'mul(206,546)>}?}how()mul(766,724)*+]don't()/ >,~{who()[)mul(562,645)from()select()~where()why():mul(921,271)<what(){&do()}mul(730,86)mul(761,726)/who()why()select()>^where()where())mul(5,76)+;]select()+^>select()(^mul(327,476)-?<[who(665,286)where()mul(17,787)<where()!{@,(when() ?mul(494,762)}&how()&where()mul(535,128)'>$/where()who()mul(797,991)*@when()]mul(288,945)!;%select()select(221,67)?where()(select()mul(103,613)>*$:#(<#mul(897,461),++'{:^mul(399,45)/[[$)what()?'mul(884,145)-<@ mul(907,419)$how()!mul(746,659)*%>why()}!do()-*why()where()mul(836,181@&>/@/)>#!;mul(511,857)what()^when(839,625)}why(642,188)mul(871,977)where()%where()select()#((when();,mul(996,95)<-from()}+mul(489,882)how()-]]&select()%~@select()mul(526,213)+where(){mul(196,64)>:#who()*(^why()(where()mul(305,841)^~&why(),@ )mul(33,152)%:+mul(276,813)?!how()-where()(>mul(166,466)mul(120,970)){+, #how()don't()<(select()/$from()!?mul(528,858),%%when()+#mul(582,880)[*how()what()-mul(880,694)why()-)how()mul(765,222)''how()'mul(568,629)'%mul(995,665)? ,};'[+mul(613,221)*)mul(90,933)how(){mul(873,519)#+how():*}#?^mul(568,189))mul(64,852)}from(101,629)!where()mul(883,789)mul(787,121)(who()'from()mul(904,116)(];[,?^mul(58,874)mul(825,942)-mul(966,765)mul(288,95)select()?where()%mul(362,992)]select()how()/select(){mul(731,806)&how(305,337)who()]when()}{why()where()mul(761,298)who()+{@;^?mul(261,9)who()mul(911,882)<;)who()/ mul(627,335)<+~-mul(975,402)what()]mul(952,216) why(),;:@when()how()mul(592,925)(!<select()where()who()who()when()why()mul(170,238)how()%why()@-$why(){mul(197,121){<from(),?mul(364,944)-$:'~~who()(^mul(608,274)''!mul(356,397)/where()how()?where()(%*mul(160,876) what()}<@select()where()where()^mul(188,916)(&;(}mul(676,879)][when()who()where()mul(204,615)-+$%how()]what()[~mul(471,735): (mul(975,734)select(851,447)mul(329,13){$from()what()}how()[mul(446,896)&mul(74,831)#@where()'mul(885,359)select():~@~:select(719,47)!-}mul(792,423)*&from(),&,@$*what()mul(182,993)who()when():>mul(12,402) mul(487,955)select():!~+>:who()@mul(777,428)^+what(385,392)'(:select()<'mul(492,807)@,mul(613,475): mul(787,127)&!,mul(289,109)?)<where()mul(220,65)what():mul(233,225)(select()do(),how()?from()mul(994,939)+@where() /select()?mul(395,849))where()mul(209,516)&,~!how()~who();>*mul(863,691)!-/@$!mul(357,967)#:?' {?what()mul(824,697){&from()+how()mul(600,525)@mul(783,413):&*$>select()&mul(192,535)?select()who()when()@
diff --git a/2024/tcl/templ.tcl b/2024/tcl/templ.tcl
new file mode 100755
index 0000000..e040b2f
--- /dev/null
+++ b/2024/tcl/templ.tcl
@@ -0,0 +1,18 @@
+#!/bin/env tclsh
+
+source lib.tcl
+setup ?
+
+puts {Part 1: }
+
+while {[gets $input line] != -1} {
+}
+
+close $input
+
+puts "1: $"
+
+puts ""
+puts {Part 2: }
+
+puts "2: $"